Skip to content

Instantly share code, notes, and snippets.

@jtdp
jtdp / gist:5443297
Last active March 13, 2024 12:58
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@benbalter
benbalter / gist.md
Last active April 21, 2024 15:50
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@sarkian
sarkian / Road Rash (1994) (3DO) wine launcher. Fixes 'Could not find any CD-ROM drive' error.
Created August 10, 2014 15:29
Road Rash (1994) (3DO) wine launcher. Fixes 'Could not find any CD-ROM drive' error.
#!/bin/bash
# Road Rash (1994) (3DO) wine launcher
# Fixes 'Could not find any CD-ROM drive' error
# NOTE: ISO-image may be any valid ISO (e.g. Ubuntu Live-CD :))
# Default configuration (game and image placed in different directories)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # path to directory with .iso (location of this script)
@awesomebytes
awesomebytes / ipython_to_file.md
Created March 16, 2016 10:38
Save iPython session to a python file as code

Save an iPython session commands/code to a file

You must use the magic method %save:

In [1]: %save?
Type:       Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace:  IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py
@trietptm
trietptm / rol-ror.py
Created August 3, 2016 16:27 — forked from vqhuy/rol-ror.py
python rol, ror operation implement
###########################################################################
# Rotating bits (tested with Python 2.7)
from __future__ import print_function # PEP 3105
# max bits > 0 == width of the value in bits (e.g., int_16 -> 16)
# Rotate left: 0b1001 --> 0b0011
rol = lambda val, r_bits, max_bits: \
(val << r_bits%max_bits) & (2**max_bits-1) | \
@eltonvs
eltonvs / arch_installation.md
Last active March 13, 2024 17:51
Arch Linux step to step installation guide

Arch Linux Installation Guide

This guide will show step-by-step how to Install Arch Linux on UEFI mode.

Table of Contents

  • Bootable Flash Drive
  • BIOS
  • Pre installation
    • Set Keyboard Layout
    • Check boot mode
  • Update System Clock
from capstone import *
data = open('flag.exe', 'rb').read()
md = Cs(CS_ARCH_X86, CS_MODE_64)
with open('asm.txt', 'w') as f:
for i in md.disasm(data[0x914:0x85fd], 0x00401514): #Capstone read from data address, not the virtual address
f.write("0x%x:\t%s\t%s\n" %(i.address, i.mnemonic, i.op_str))
f.close()
byte = []
key = []
@cnlohr
cnlohr / forgot_to_check_out_with_recurse_submodules.md
Last active April 22, 2024 12:13
Git forgot to clone recursively (forgot to check out with recurse submodules)
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@XVilka
XVilka / Makefile
Last active July 5, 2021 05:27
Rizin API use with Go/cgo
all:
go build -v
run:
go run rz-api.go