Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am adriah on github.
  • I am adriah (https://keybase.io/adriah) on keybase.
  • I have a public key ASDg4lGNMMdgx2hQCwE_UxC5xK46IVKjfnV88PDeziOBJQo

To claim this, I am signing this object:

@adriah
adriah / oppgave1.c
Created August 25, 2017 11:49
Her er en liten versjon av ukseoppgave 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if(argc != 2){
fprintf(stderr, "Not enough arguments\n");
return -1;
} else {
@adriah
adriah / mail.py
Last active December 6, 2016 14:00
# -*- coding: utf-8 -*-
import smtplib
import sys
import markdown2
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Check args
if len(sys.argv) != 5:
#include <unistd.h>
void main()
{
while(1){
fork();
}
}
@adriah
adriah / solve.py
Created July 19, 2016 08:59
Her har jeg kun prøvd å printe ut ascii verdiene, men som du ser så får jeg kun ut 32 av ascii
import re
f = open("text.txt")
lines = f.read()
pattern = re.compile(r'([^a-zA-Z0-9\n()"\';.-`-,])')
listyay = re.findall(pattern, lines)
listyay = [ord(c) for c in listyay]
print listyay
@adriah
adriah / .xinitrc
Created November 25, 2014 16:41
This is the part that goes into .xinitrc before dwm
#Put this in your .xinitrc before DWM, or in your DWM launchscript as in: https://github.com/adrian20038/rice/blob/master/Scripts/dwm-start
while true; do
$HOME/Scripts/statusbar
sleep 2
done &
@adriah
adriah / pipes.sh
Created November 24, 2014 19:06
This is a shell that makes pipes in your terminal
#!/bin/sh
declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0
declare -ir w=$(tput cols) h=$(tput lines)
declare -i x=$((w/2)) y=$((h/2))
declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93"
[10]="\x9b" [11]="\x81" [12]="\x93"
[21]="\x97" [22]="\x83" [23]="\x9b"
[30]="\x97" [32]="\x8f" [33]="\x81" )