Skip to content

nickshin/CheatSheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nick Shin's Programming Cheatsheets

This page will list some sample code files that I have writen and have made available to the public domain.

These are mostly to help remind me a few bits of details that (when working with a pile of different programming and scripting languages) I like to copy and paste code that I use a lot (efficiently), often (lazy) or rarely (forgetful).


C

  • will describe design patterns in C (even though patterns are normally used with Object Oriented languages)
    • creational patterns
    • structural patterns
    • behavioral patterns
    • design principles

C++

  • covers the following C++ usage:
    • constructors
    • destructors
    • base, derived, multiple inheritance and friendship classes
    • private vs protected vs public member data access
    • pure and basic virtual function declarations
    • polymorphism
    • type casting
  • covers the following C++ usage:
    • templates
    • const-ness
    • dynamic memory
    • exceptions
  • covers the following:
    • STL programming
      • containers
      • algorithms
    • some Boost library features
      • foreach
      • smart pointers
    • and using class string

external links:


LLVM

LLVM_Clang_cheatsheet1 (coming soon)

  • notes and boilerplate LLVM & Clang project

external links:


Perl

  • written to be included in by perl_cheatsheet2 and contains the following perl snippets:
    • unique sort
    • time n date
    • file notes
    • wget
  • executable and contains more perl snippets:
    • file IO
    • fork
    • arrays, arrays of arrays, array references, slice n splice
    • hashes, hashes of arrays, hash references
    • references to functions
    • and some boiler plate code
  • example perl module
  • using the perl module
  • while showing the tiny differences on:
    • require
    • use
    • fully qualified names
    • automatic exported names
    • controlled (manually) exported names

external links:

  • good collection of perl tips: Perl Training Australia - Perl Tips
  • and if you ever thought to yourself, "someone has to have written this in PERL"... chances are: someone did and threw it up on CPAN

Python

  • covers the following python usage:
    • some of my most used python snippets
    • file IO
    • dictionary
    • lists, tuples and arrays
    • classes

here are some more python code i have made free to the public:

external links:

  • keep a page opened to: Python: Library Reference
  • and if you ever thought to yourself, "someone has to have written this in PYTHON"... chances are: someone did and threw it up on PyPI

Ruby

Please see my networking notes for more sample code written in Ruby used to generate the all of the network code and pretty printed HTML files.

external links:


Network

  • covers networking sockets (open read write close) (for both peer2peer and multi-users) in:
    • C/C++
    • C#
    • Exlixir
    • GoLang
    • Java
    • Node.js
    • Perl
    • Python
    • Ruby
    • Scala

if the "all in one file" is too confusing to look at (hurray for VIM! ":set filetype=lang"), run the script to generate all of the network code for the different programming languages:

ruby network_notes1.rb code
  • covers the following networking snippets:
    • Node.js
      • http(s)://
      • ws(s)://
      • AMQP(s)://
      • XMPP(s)://
    • Let's Encrypt
    • HTTPd
      • SSL
      • CGI / FastCGI
    • AMQP
      • RabbitMQ
    • XMPP
      • ejabberd
        • writing server components
        • websockets
        • HTTP binding
        • admin
  • generates .htaccess files (for authentication access) for
    • Apache
    • lighttpd
  • covers the following networking snippets:
    • Concurrency
    • WebSockets
    • WebRTC
    • SSL (libraries)
    • behind firewall (STUN TURN ICE)

my notes on:

external links (Writing Network Servers)


HTML5

  • WARNING: i do not use these anymore -- left here for reference...
  • covered things like: screen orientation, audio, video, websockets and webstorage
  • WARNING: i do not use these anymore -- left here for reference...
  • covered demos like: audio, drag & drop, pointerlock and swipegesture

HTML5-cheatsheet3

  • was going to cover the following topics:
    • emscripten
      • web assembly
      • webgl2
      • multi-threading
      • file manager (async and local storage)
  • much of this work was plowed into:
    • UnrealEngineHTML5
      • run your UE4 projects in the (latest) browsers!
      • i helped maintained this for a handful of years until EPIC has ended official support of the HTML5 platform the end of 2019

external links:

  • HTML5 Gamepad Tester - fantastic way to test your gamepads on your OS on your browser
  • three.js - the mother load of all things 3D in HTML5
  • d3js.js - the mother load of all things data-driven-docs in HTML5

favorite browser extensions:

favorite mobile browser:


PHP

  • covers the following PHP usage:
    • predefined variables: _GET _POST _SERVER _FILES
    • binary and file handling
    • passing by reference
    • classes
  • covers the following PHP usage:
    • user agent detection
    • crafted headers
    • memcache
    • NoSQL (coming soon, my most used snippets...)

external links


Linux

  • covers the following:
    • some of my most used docker snippets
    • local/private registry notes

docker_cheatsheet2.md (coming soon)

  • provisioning (machine)
  • clustering/scheduling (swarm & swarmkit)
  • orchestration (composer)
  • service discovery
  • monitoring/security

docker_cheatsheet3.md (coming soon)

  • my favorite Dockerfiles
  • unikernels
  • notes on building LLVMLinux with LLVM, Clang and LLDB
  • covers the following:
    • kernel module programming
    • character device driver
    • usb stick example
  • notes on SolidStateDrive optimizations, display DPI settings and surface pro 3 configurations

external links:


Vim

  • latest vimrc file I use:

    • editor configuration
    • plugin mapings
    • and some archived configs and maps for reference
  • my vim_notes.txt on plugins & stuff

    • a list of plugins i found useful in the past or currently
    • a bit of how to use them and where to find them
    • and old settings that i used to use...
  • vim_fetch.sh plugins

    • normally, plugins only need be placed in: .vim/bundle
    • but sometimes, some packages needs some extra hand holding to get em working (especially when working on a bunch of different OS)
    • this script helps me remember them

external links:


3D Math

  • covers the following 3D math:
    • matrix math
    • vector math
    • lines w/ points, lines, circles equations
    • planes w/ points, lines, planes equations

Misc

external links:


License

Unlicense


About

Nick Shin's Programming Cheatsheets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published