Skip to content

Instantly share code, notes, and snippets.

View nocturnaltortoise's full-sized avatar
:shipit:

Simon Turner nocturnaltortoise

:shipit:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nocturnaltortoise on github.
  • I am simonturner34 (https://keybase.io/simonturner34) on keybase.
  • I have a public key ASCNEoM5e9N3_3Z7kmW1IaBERAP9h6eIYdf_zrHQI7AVOwo

To claim this, I am signing this object:

@nocturnaltortoise
nocturnaltortoise / desktopwriter.py
Created January 7, 2016 18:59
A simple python script to write .desktop files.
app_name = input("Application Name: ")
comment = input("Tooltip: ")
generic_name = input("Generic Name: ")
exec_name = input("Path to exec: ")
icon = input("Path to icon: ")
app_type = "Application"
categories = []
more_categories = True
while(more_categories):
import pygame, sys
from pygame.locals import *
from enum import Enum
class Game:
def __init__(self, width, height, game_state):
pygame.init()
self.Game_State = Game_State(game_state)
@nocturnaltortoise
nocturnaltortoise / coincidence.c
Created September 12, 2015 15:08
Program for counting similarities between two strings, in C.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
void print_usage_on_error();
void print_coincidences(int[], int, size_t);
void count_coincidences(char[], char[], int *, int);
void remove_spaces(char *);
@nocturnaltortoise
nocturnaltortoise / gist:9c1b741d93b10aa4a19c
Last active August 29, 2015 14:17
Ethernet Driver Reinstaller for Realtek rtl8168
#!/bin/sh
(( EUID != 0 )) && exec sudo -- "$0" "$@"
cd /opt/r8168-8.039.00/
make clean modules
make install
depmod -a
insmod ./src/r8168.ko
echo "r8168" >> /etc/modules