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
OBJ = ImageWidget.o ScriptHandler.o TargaImage.o | |
INCLUDE = | |
LIB = | |
LINK = -lfltk -lX11 -lXext | |
ifeq ($(OS),Windows_NT) | |
# Windows | |
INCLUDE = -I/p/graphics/local/packages/fltk-1.0.11/include\ | |
-I/p/graphics/local/packages/libtarga/include |
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
// $ em++ -lwebsocket.js -o index.html main.cpp | |
#include <emscripten/emscripten.h> | |
#include <emscripten/websocket.h> | |
#include <stdio.h> | |
EM_BOOL onopen(int eventType, const EmscriptenWebSocketOpenEvent *websocketEvent, void *userData) { | |
puts("onopen"); | |
EMSCRIPTEN_RESULT result; |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
void print_bits(int i) { | |
// prints out the binary representation of a 32bit int | |
int mask = (1 << 1) - 1; | |
int bit = 0; | |
printf("0x%08X is\n", i); | |
// reverse loop pulling out one bit at a time |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
// prints out the binary representation of i | |
void print_bits(int i) { | |
int mask = (1 << 1) - 1; | |
int bit = 0; | |
printf("0x%08X is\n", i); |
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 time | |
import os | |
from datetime import datetime | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC |
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
// ==UserScript== | |
// @name craigslist | |
// @namespace craigslist | |
// @include https://*.craigslist.org* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var popup = $('<div>').css({ | |
height: 400, |
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
atom-text-editor, | |
atom-text-editor.editor, | |
atom-panel, | |
.tree-view, | |
.tab-bar { | |
font-family: 'Terminus (TTF)'!important; | |
-webkit-font-smoothing: none; | |
font-style: normal; | |
font-size: 12px; | |
} |
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
#!/bin/bash | |
input=$1 | |
trf=".$1.trf" | |
extension="${input##*.}" | |
filename="${input%.*}" | |
output="${filename}_deshaked.${extension}" | |
/usr/bin/ffmpeg -i $input -vf vidstabdetect=shakiness=10:accuracy=15:result="${trf}" -f null - | |
/usr/bin/ffmpeg -i $input -vf vidstabtransform=input="${trf}" $output |
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 my_compare_type(context, inspected_column, | |
metadata_column, inspected_type, metadata_type): | |
replace = dict( | |
VARCHAR='String', | |
BOOLEAN='Boolean', | |
DATETIME='DateTime', | |
INTEGER='Integer', | |
TEXT='Text' | |
) | |
pattern = re.compile( '|'.join(replace.keys())) |
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/env python | |
import datetime | |
import flask | |
import json | |
import thread | |
import time | |
import uuid | |
from Queue import Queue |
NewerOlder