Skip to content

Instantly share code, notes, and snippets.

@iamgreaser
iamgreaser / gist:23ce0552944a90e5f2ba
Created August 14, 2014 04:23
CRC32 for ARM with puts!
.arch armv4
code_beg:
ldr sp, =0x0000FFFC
ldr r0, =msg_test
bl puts
mov r0, #0x00000000
mov r1, #(code_end - code_beg)>>2
bl crc32
#
# By Kyle Kersey
# 2014
#
import praw
import sqlite3
import sys
database_path = "reddit_comments.db"
@lnicola
lnicola / Makefile
Created June 20, 2014 15:44
small ARM Linux executable
all:
gcc -pipe -nostdlib -nostartfiles -Qn -Wl,--build-id=none -o tiny-hello tiny-hello.s
strip -R .ARM.attributes tiny-hello
! ./tiny-hello
ls -l tiny-hello
clean:
rm -f tiny-hello
[BITS 16] ; We need 16-bit intructions for Real mode
[ORG 0x7C00] ; The BIOS loads the boot sector into memory location 0x7C00
;jmp word load
global _start
jmp _start
drive db 0
; jmp reset_drive
; jmp enter_pm
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 7, 2025 05:43
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@mbostock
mbostock / .block
Last active February 9, 2016 01:55
Cubehelix
license: gpl-3.0
@jcave
jcave / DigitalOcean-BasicRailsSetup.md
Last active February 12, 2016 01:52
How to set up a DigitalOcean server with their 1-click Ubuntu/Rails/Ngnix/Unicorn/Mysql install

Basic Rails App on Digital Ocean / Ngnix / Unicorn

Most of this I got from the DigitalOcean file.

  1. Sign up for an account at digitalocean.com. Create a droplet using the pre-configed Ubuntu 12.10/Rails/Ngix/Unicorn option and using an ssh key if you set one up first. [An overview can be found here.] (https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2) If you don’t set up an SSH key, that's okay, DigitialOcean (DO) will send you one to your email.
  2. Once setup with an IP, point your domain or subdomain to the IP from wherever you are hosting as an A record. Log in using ssh [email protected]. Enter your password if needed.
  3. Type passwd into the console to change the password of root to something you can remember.
  4. If you want add a new user so you don’t have to use root then type adduser [username] in the console. Feel free to fill out the Fu
@mbostock
mbostock / .block
Last active September 11, 2024 10:57
Random Traversal III
license: gpl-3.0
@BobNisco
BobNisco / controller.js
Last active February 27, 2023 15:43
onLongPress AngularJS Directive - Great for mobile!
// Somewhere in your controllers for this given example
// Example functions
$scope.itemOnLongPress = function(id) {
console.log('Long press');
}
$scope.itemOnTouchEnd = function(id) {
console.log('Touch end');
}
@mbostock
mbostock / .block
Last active February 9, 2016 01:57
Countdown
license: gpl-3.0