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> | |
enum { | |
SHOW, | |
HIDE, | |
COVERED, | |
}; | |
int main() { | |
printf("%d", SHOW); |
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 python3 | |
import sys | |
orig_stdout = sys.stdout | |
f = open('out.txt', 'w') | |
sys.stdout = f | |
alphabets = "qwertyuiopasdfghjklzxcvbnm" | |
codes = [ x + y + z for x in alphabets for y in alphabets for z in alphabets ] |
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 string | |
import sys | |
words = {} | |
strip = string.whitespace + string.punctuation + string.digits + "\"'" | |
for filename in sys.argv[1:]: | |
for line in open( filename ): | |
for word in line.lower().split(): | |
word = word.strip( strip ) | |
if len( word ) > 2: |
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
// Written by Pioz. | |
// Compile with: gcc -o autoclick autoclick.c -lX11 | |
#include <stdio.h> | |
#include <string.h> | |
#include <X11/Xlib.h> | |
// Simulate mouse click | |
void | |
click (Display *display, int button) |
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
// g++ font_path_list.cxx $(pkg-config x11 --libs --cflags) | |
#include <X11/Xlib.h> | |
#include <cassert> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> |
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
// CODE | |
/* test.cc | |
* Compile with: g++ `pkg-config --cflags --libs x11` test.cc -o test | |
* Run with: ./test | |
*/ | |
#include <stdio.h>//printf | |
#include <string.h>//strlen | |
#include <stdlib.h>//atexit |
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 <X11/Xlib.h> | |
#include <iostream> | |
#include <unistd.h> | |
int main(void) { | |
Display* dpy = XOpenDisplay(0); | |
int scr = XDefaultScreen(dpy); | |
Window root_window = XRootWindow(dpy, scr); | |
int height = DisplayHeight(dpy, scr); |
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
/* | |
* Simple Xlib application drawing a box in a window. | |
* gcc input.c -o output -lX11 | |
* Adopted from http://en.wikipedia.org/wiki/Xlib | |
*/ | |
#include <X11/Xlib.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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 <gdk/gdk.h> | |
int main( int argc, char* argv[] ) { | |
gdk_init( &argc, &argv ); | |
gdk_exit( 0 ); | |
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
/* | |
* Print entire HTML text after processed JavaScript | |
* | |
* build: | |
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0` | |
* gcc -Wall $FLAGS getbodytext.c -o getbodytext | |
* | |
* usage: | |
* /usr/bin/xvfb-run ./getbodytext test.html | |
* |