Skip to content

Instantly share code, notes, and snippets.

View funrep's full-sized avatar

Karl-Oskar Rikås funrep

View GitHub Profile
@funrep
funrep / gist:3848392
Created October 7, 2012 13:23
urxvt libs
$ ldd /usr/bin/urxvt
linux-vdso.so.1 (0x00007ffff1577000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fcc0c927000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007fcc0c6ed000)
libXft.so.2 => /usr/lib/libXft.so.2 (0x00007fcc0c4d8000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007fcc0c2cd000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fcc0bf94000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007fcc0bd72000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fcc0bb24000)
libstartup-notification-1.so.0 => /usr/lib/libstartup-notification-1.so.0 (0x00007fcc0b91b000)
@funrep
funrep / gist:3848260
Created October 7, 2012 12:31
nanorc
## nano.rc file
include "/usr/share/nano/nanorc.nanorc"
## C/C++
include "/usr/share/nano/c.nanorc"
## Makefiles
include "/usr/share/nano/makefile.nanorc"
## Cascading Style Sheets
@funrep
funrep / gist:3795520
Created September 27, 2012 18:17
k&r exercise 1-13 attempt
#include <stdio.h>
#define OUT 1 /* outside a word */
#define IN 0 /* inside a word */
#define MAX 30 /* max words */
main()
{
int c, i, j, state, nw;
int words[MAX];
@funrep
funrep / gist:3789494
Created September 26, 2012 17:52
asdfad
#include <stdio.h>
/* count digits, white space, others */
main()
{
int c, i, nwhite, nother;
int ndigit[10]; /* this declares an array with 10 variables in it? */
nwhite = nother = 0;
for (i = 0; i < 10; ++i)
ndigit[i] = 0;
#include <stdio.h>
main()
{
int i;
int = 10;
for (i = 0; i < 10; ++i)
printf("%d\n", i);
printf("%d\n", i);
@funrep
funrep / gist:3782793
Created September 25, 2012 16:03
hello
/*fahrenheight to celsius program*/
#include <stdio.h>
#define LOWER 0
#define UPPER 300
#define STEP 20
int celsius(float);
@funrep
funrep / gist:3782742
Created September 25, 2012 15:55
conversion
/*fahrenheight to celsius program*/
#include <stdio.h>
#define LOWER 0
#define UPPER 300
#define STEP 20
int celsius(int);
@funrep
funrep / gist:3776802
Created September 24, 2012 16:19
fahrtocel
/*fahrenheight to celsius program*/
#include <stdio.h>
#define LOWER 0
#define UPPER 300
#define STEP 20
float conversion(float fahr, float celsius);
@funrep
funrep / gist:3772446
Created September 23, 2012 17:40
functions
#include <stdio.h>
int power(int m, int n); /* is this a variable for the whole program? is it an array?, what does n and m means, they are never used in the real program so i dont get it. */
main()
{
int i;
for(i = 0; i < 6; ++i) /* this prints what 2 is being raised to */
@funrep
funrep / gist:3771505
Created September 23, 2012 14:25
hmm
^[[4;37mimg^[[0;34m # ^[[0;0m^[[K^M^[[4;37mimg^[[0;34m # ^[[0;0m
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^
H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[[K^M^[[4;37m
img^[[0;34m # ^[[0;0m ^H^H^H
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^
H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[[K^M^[[4;37mimg^[[0;34m # ^[[0;0m
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^
H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[[K^M^[[4;37mim
g^[[0;34m # ^[[0;0m ^H^H^H^H
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^