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 <stdio.h> | |
int main(int argc, char **argv) { | |
int (*zzz)(const char *k, ...); | |
zzz = printf; | |
zzz("hello world\n"); | |
return 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
#include <stdio.h> | |
int add(int a, int b) { | |
return a + b; | |
} | |
int main(int argc, char **argv) { | |
int ret; | |
int (*fn_ptr)(int a, int b); |
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
var Browser = require('zombie'); | |
var assert = require('assert'); | |
var browser = new Browser(); | |
logIn(); | |
console.log('logged in successfully'); | |
function logIn() { |
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 <stdio.h> | |
#include <stdlib.h> | |
int total; | |
void npowerk(int n, int k) { | |
int i; | |
if (k > 0) | |
for (i = 0; i < n; i++) | |
npowerk(n, k - 1); |
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
INRES="1366x768" # input resolution | |
FPS="20" # target FPS | |
QUAL="fast" | |
URL="rtmp://live-jfk.twitch.tv/app/key" | |
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 \ | |
-f alsa -i hw:0,0 -ac 2 -vcodec libx264 -crf 30 -preset "$QUAL" -s "$INRES" \ | |
-acodec libmp3lame -ab 96k -ar 44100 -threads 0 -pix_fmt yuv420p \ | |
-f flv "$URL" |
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
if ('0') | |
console.log("'0' is true") | |
if (0) | |
console.log("0 is true") | |
else | |
console.log("0 is false") | |
if ('0' == 0) | |
console.log("'0' is 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
require 'sinatra' | |
set :port, 3000 | |
get '/webhook_url' do | |
return params[:venmo_challenge].to_s | |
end |
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
function fact(x) { | |
return (function f(n, m, x) { | |
if (n == x) return m; | |
return f(n+1, m*(n+1), x) | |
})(0, 1, 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
#include <stdio.h> | |
#include <pthread.h> | |
#define THREAD_COUNT 10 | |
// Each thread will run an | |
// instance of this function | |
void *worker(void *arg) { | |
printf("I'm worker #%d\n", (int)arg); | |
return NULL; |
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 <stdio.h> | |
#include <pthread.h> | |
#define THREAD_COUNT 30 | |
// Each thread will run an | |
// instance of this function | |
void *worker(void *arg) { | |
printf("I'm worker #%d\n", (int)arg); | |
return NULL; |
OlderNewer