Skip to content

Instantly share code, notes, and snippets.

@hraban
hraban / pre-commit.md
Last active April 18, 2024 06:46
Prevent accidentally committing debug code in Git
@derwolfe
derwolfe / gist:434ba30127660781730e
Last active July 7, 2018 10:38
Installing twisted on windows
  1. install python 2.7.9 from here https://www.python.org/downloads/; if using a different python, then you may need to install pip using get-pip.py
  2. add the directory located at C:\python27\scripts to the end of your path with ;C:\python27\scipts
  3. upgrade pip to ensure that you have a version that supports installing wheels - pip install -U pip
  4. run pip install virtualenv
  5. run virtualenv venv
  6. if using:
    • cmd run .\venv\activate
    • powershell run .\venv\Scripts\activate.ps1. By default, powershell doesn't allow execution of unsigned scripts. This can be turned off by setting the execution policy to a more permissive setting. This can be done with open powershell and typing: Set-ExecutionPolicy Unrestricted. You will then be prompted about whether or not you'd like to really allow this; to accept type Y and hit enter.
    • git bash prompt run source ./venv/Scripts/activate

Git Cheat Sheet

Commands

Getting Started

git init

or

@roachhd
roachhd / README.md
Last active August 24, 2025 19:46
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@grugq
grugq / gist:03167bed45e774551155
Last active August 5, 2025 10:16
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@staltz
staltz / introrx.md
Last active August 23, 2025 15:59
The introduction to Reactive Programming you've been missing
@pinealservo
pinealservo / gist:9260116
Created February 27, 2014 21:38
C Pointers in a nutshell
If you think you know how they work and how the syntax works but you still can't use them, then you probably don't *actually* understand how they work and how the syntax works.
In C, when you declare a variable with something like
int x;
you are asking the compiler to reserve some space in memory to store a value, and you are also defining a name. So there are three distinct things here; a *name*, a *value*, and a *storage location*.
When a name appears on the left-hand side of an assignment (i.e., a statement like `x = 3;`) it refers to the *storage location* that the compiler set aside when you declared the variable. So the assignment will change the *value* that is stored at the variable's *storage location* by setting it to the *value* of the expression on the right-hand side of the `=`.
@hofmannsven
hofmannsven / README.md
Last active July 29, 2025 21:38
Raspberry Pi Cheatsheet
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@cosimo
cosimo / parse-options.sh
Created September 21, 2012 09:31
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"