This file contains hidden or 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
quine.small.asm: quine.asm | |
python convert.py human_to_small | |
quine.bin: quine.asm | |
nasm -f bin -o quine.bin quine.asm | |
floppy: quine.bin | |
dd status=noxfer conv=notrunc if=quine.bin of=floppy | |
emu: floppy |
This file contains hidden or 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
<html> | |
<head> | |
<title>My First HTML Page</title> | |
</head> | |
<body> | |
<h1>Way to insert image on a webpage.</h1> | |
<b><i><p>Below is a image :-</b></i></p> | |
<img src="http://1.bp.blogspot.com/-miqmqC8clI8/Ufixy7CFccI/AAAAAAAAADU/PdhBFd1Xwtg/s320/engagelikeusonfacebook.jpg" alt="Programming Skills" width="500px" height="500px"> | |
</body> |
This file contains hidden or 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 sys | |
from PIL import Image, ImageDraw | |
try: | |
import cv | |
except ImportError: | |
print 'Could not import cv, trying opencv' | |
import opencv.cv as cv |
This file contains hidden or 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
/* | |
* Run this in a Firefox "Scratchpad" (Tools > Web Developer > Scratchpad) | |
* With Cmd-R to simulate an orientation event in the current page | |
*/ | |
function simulateOrientation(alpha, beta, gamma) { | |
var event = document.createEvent("DeviceOrientationEvent"); | |
event.initDeviceOrientationEvent('deviceorientation', | |
true, true, alpha, beta, gamma, true); |
This file contains hidden or 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
""" | |
Taken from my suggestion at: | |
https://groups.google.com/forum/#!msg/tweepy/OSGRxOmkzL4/yaNT9fL9FAIJ | |
Note that this is an incomplete snippet; you'll need to create the API auth object. | |
""" | |
import simplejson as json | |
import tweepy |
This file contains hidden or 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
; | |
; Selfer. | |
; | |
; Shikhin Sethi, the author of selfer, has dedicated the work to the public domain | |
; by waiving all of his or her rights to the work worldwide under copyright law, | |
; including all related and neighboring rights, to the extent allowed by law. | |
; | |
; You can copy, modify, distribute and perform the work, even for commercial purposes, | |
; all without asking permission. | |
; |
This file contains hidden or 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
; | |
; Selfer. | |
; | |
; Shikhin Sethi, the author of selfer, has dedicated the work to the public domain | |
; by waiving all of his or her rights to the work worldwide under copyright law, | |
; including all related and neighboring rights, to the extent allowed by law. | |
; | |
; You can copy, modify, distribute and perform the work, even for commercial purposes, | |
; all without asking permission. | |
; |
This file contains hidden or 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
-- Using lua to parse CSV file to a table. | |
-- Notice: first line must be data description filed. | |
-- The separator is '|', change it if you want. | |
-- Usage: csv = require('csv') | |
-- tab = csv.load('test.csv', ',') | |
-- table.foreach(tab[1], print) | |
-- print(tab[1].you_field) | |
--encoding=utf-8 |
This file contains hidden or 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
// Converts degrees to radians. | |
#define degreesToRadians(angleDegrees) (angleDegrees * M_PI / 180.0) | |
// Converts radians to degrees. | |
#define radiansToDegrees(angleRadians) (angleRadians * 180.0 / M_PI) |
This file contains hidden or 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
// Bubble Sort | |
// http://en.wikipedia.org/wiki/Bubble_sort | |
// Christopher Davis 2013 | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <assert.h> | |
void swap(int *array, const unsigned int from, const unsigned int to) | |
{ | |
int tmp; |