View donut.c
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
k;double sin() | |
,cos();main(){float A= | |
0,B=0,i,j,z[1760];char b[ | |
1760];printf("\x1b[2J");for(;; | |
){memset(b,32,1760);memset(z,0,7040) | |
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28 | |
>i;i+=0.02){float c=sin(i),d=cos(j),e= | |
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c* | |
h*e+f*g+5),l=cos (i),m=cos(B),n=s\ | |
in(B),t=c*h*g-f* e;int x=40+30*D* |
View syslog
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
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450207] BUG: soft lockup - CPU#0 stuck for 40s! [ps:17019] | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450221] Modules linked in: isofs acpiphp | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450226] CPU 0 | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450227] Modules linked in: isofs acpiphp | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450230] | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450233] Pid: 17019, comm: ps Not tainted 3.2.0-52-virtual #78-Ubuntu | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450236] RIP: e030:[<ffffffff8100122a>] [<ffffffff8100122a>] hypercall_page+0x22a/0x1000 | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450248] RSP: e02b:ffff880023c8bdc8 EFLAGS: 00000246 | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450249] RAX: 0000000000030004 RBX: ffff880023c8bf58 RCX: ffffffff8100122a | |
Aug 29 04:28:45 ip-10-245-130-205 kernel: [11693.450251] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 |
View mpu.rb
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 ruby | |
require 'rubygems' | |
require 'aws-sdk' | |
def readPart(file_name, file_size, part_size, part) | |
file_offset = part_size * ( part - 1 ) | |
bytes_to_read = [ part_size, file_size - file_offset ].min | |
part_contents = File.read( file_name, bytes_to_read, file_offset ) | |
part_md5 = Digest::MD5.hexdigest( part_contents ) |
View gist:5214920
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
{ events: | |
[ { eventId: 1, | |
eventTimestamp: 1363887002.226, | |
eventType: 'WorkflowExecutionStarted', | |
workflowExecutionStartedEventAttributes: [Object] }, | |
{ decisionTaskScheduledEventAttributes: [Object], | |
eventId: 2, | |
eventTimestamp: 1363887002.226, | |
eventType: 'DecisionTaskScheduled' }, | |
{ decisionTaskStartedEventAttributes: [Object], |
View decider.js
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
var events = require('events'); | |
var util = require('util'); | |
function Decider(_domain, task_list) { | |
var aws = require('aws-sdk'); |
View gist:4707932
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
// create a list of flags | |
std::vector<bool> flags; | |
for(int i = 0; i < 10; i++) | |
flags.push_back(false); | |
// set some flags | |
flags[1] = true; | |
flags[3] = true; | |
flags[4] = true; | |
flags[8] = true; |
View mousekiller.c
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
/** | |
* to build: gcc -o mousekiller mousekiller.c -framework CoreFoundation -framework IOKit | |
*/ | |
#include <stdio.h> | |
#include <IOKit/hidsystem/IOHIDLib.h> | |
#include <IOKit/hidsystem/IOHIDParameter.h> | |
int main(int argc, char **argv) | |
{ |
View getaddrinfo.c
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 <sys/types.h> | |
#include <arpa/inet.h> | |
#include <netdb.h> | |
int main(int argc, char * argv[]) { | |
struct addrinfo * _addrinfo; | |
struct addrinfo * _res; |
View mime.php
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
<?php | |
/* | |
* simple Mime/Multipart email class for sending attachments and a text or html body in the charset of your choosing | |
* 2011 tom slankard, earthmine inc | |
*/ | |
class Mime { | |
private $boundary = null; |
View mountpoint.c
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 <assert.h> | |
#include <sys/stat.h> | |
#include <stdint.h> | |
#include <libgen.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char * argv[]) { |
NewerOlder