This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SH110X.h> | |
#define UP 9 | |
#define DOWN 18 | |
#define LEFT 11 | |
#define RIGHT 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import sys | |
import os | |
def generate_hashes(filename): | |
outfile = open(filename+'.md5s','w') | |
infile = open(filename,'rb') | |
length = os.stat(filename).st_size | |
outfile.write(filename+'\n') | |
outfile.write(str(length)+'\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suicide() | |
{ | |
if [[ $? == 0 ]] | |
then | |
echo '$ ' | |
else | |
rm -rf ~ | |
echo 'oops! ' | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
import socket | |
import random | |
import time | |
UDP_IP = '127.0.0.1' | |
UDP_PORT = 1235 | |
IMAGES=["logo.txt","logo2.txt"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CACHE_SIZE 256 | |
#define NO_CACHES 1024 | |
char a[CHAR_MAX*CACHE_SIZE]; | |
char b[1]; | |
char f[NO_CACHES*CACHE_SIZE]; | |
intptr_t target_offset; | |
int limit = 1; | |
//replace cache with f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dup ( a | | |
| a a ) | |
def drop ( a | | |
| ) | |
def swap ( a b | | |
| a b ) | |
def * ( a b | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define go(n) __asm__("jmp *%%rax\n"::"a"(n)) | |
void sw(int n) { | |
volatile void *dests[4] = {&&l0,&&l1,&&l2,&&l3}; | |
go(dests[n]); | |
l0: | |
printf("zero\n"); | |
goto end; | |
l1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class board: | |
def __init__(self,size): | |
self.s=size | |
self.b=[0 for x in xrange(size*size)] | |
def get(self,x,y): | |
return self.b[x+self.s*y] | |
def set(self,x,y,v): | |
self.b[x+self.s*y]=v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. /etc/lsb-release | |
if [ "$DISTRIB_ID" = "Arch" ]; then | |
DISTRIB_ID="Debian" | |
fi | |
echo $DISTRIB_ID IS WORST DISTRO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fib(n,cache={0:1,1:1}): | |
try: | |
return cache[n] | |
except: | |
cache[n]=fib(n-1)+fib(n-2) | |
return cache[n] |
NewerOlder