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
from random import random | |
# triple quotes let you make a multi line string. | |
d = """Actionable a | |
Actualize v | |
Best practice n | |
Conceptualize v | |
Cash-neutral a | |
Cost-centered a | |
Customer-centered a |
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
2012/02/05 18:55:03 [debug] 26882#0: epoll: fd:6 ev:0001 d:00007F62DAF07010 | |
2012/02/05 18:55:03 [debug] 26882#0: accept on 0.0.0.0:57867, ready: 0 | |
2012/02/05 18:55:03 [debug] 26882#0: posix_memalign: 0000000000785350:256 @16 | |
2012/02/05 18:55:03 [debug] 26882#0: *3 accept: 127.0.0.1 fd:3 | |
2012/02/05 18:55:03 [debug] 26882#0: *3 event timer add: 3: 60000:1328468163388 | |
2012/02/05 18:55:03 [debug] 26882#0: *3 epoll add event: fd:3 op:1 ev:80000001 | |
2012/02/05 18:55:03 [debug] 26882#0: timer delta: 37560 | |
2012/02/05 18:55:03 [debug] 26882#0: posted events 0000000000000000 | |
2012/02/05 18:55:03 [debug] 26882#0: worker cycle | |
2012/02/05 18:55:03 [debug] 26882#0: epoll timer: 60000 |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Test Page</title> | |
<style type="text/css" media="screen"> | |
*{ |
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
#!/usr/bin/env python | |
# cb-fortune | |
# ---------- | |
# A silly little python script for testing changes to notify-osd settings. | |
# It kills notify-osd before sending a fortune notification. Requires python-notify & fortune. | |
import os | |
#if DISPLAY is not set, then set it to default ':0.0' | |
if len( os.getenv( 'DISPLAY', '' ) ) == 0: | |
os.putenv( 'DISPLAY', ':0.0' ) |
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
*.rle | |
*.life | |
embed.js | |
embed.txt | |
small.html | |
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
.PHONY: test | |
test: helloworld | |
@gcl -f helloworld.c | |
@python helloworld.c | |
@bash helloworld.c | |
@./helloworld | |
@php helloworld.c | |
helloworld: helloworld.c |
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
print (lambda x:x+repr((x,)))('print (lambda x:x+repr((x,)))',) |
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
void insertion_sort(int data[], int length){ | |
for (int i = 0; i < length; i++) { | |
for (int j = i; j > 0; --j) { | |
if(data[j] < data[j - 1]){ | |
swap(data + j, data + j - 1); | |
}else{ | |
break; | |
} | |
} | |
} |
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
/* | |
* | |
* A plateau is a sequence of one or more consecutive occurrences of the same value in an array. For | |
* instance, the array [3, 7, 7, 9, 5, 2, 2, 2, 7, 5, 5, 1] has the following plateaus [3], [7, 7], [9], [5], [2, 2, | |
* 2], [7], [5, 5], and [1]. The longest of these is [2, 2, 2]. Write a program that uses pointers to determine | |
* and print out the longest plateau for a given array. The program should output the lowest and the | |
* highest subscript of the longest plateau. | |
* | |
*/ |
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
#include <iostream> | |
using namespace std; | |
// assumes that sizeof(float) = sizeof(int) = 4 (32 bits) | |
void showFloatBin(float f){ | |
int n = *((int*) &f); // cast the address of the float f | |
// to a pointer to an integer and | |
// then dereference that pointer | |
// loop through each bit in the float, printing out the |