Skip to content

Instantly share code, notes, and snippets.

View tobiasvl's full-sized avatar
🦀
Learning Rust

Tobias V. Langhoff tobiasvl

🦀
Learning Rust
View GitHub Profile
<?php
$audit = file_get_contents('audit.txt');
$audit = split("\n", $audit);
$data = Array();
for ($i=0; $i!=count($audit); $i++) {
$line = $audit[$i];
$datatype = substr($line, 0, 1);
switch ($datatype) {
case '-':
$day = substr($line, 3, 10);
@seungwon0
seungwon0 / Whatthecommit
Created January 30, 2011 02:56
Random commit message generator
#! /bin/sh
#
# whatthecommit - Random commit message generator
#
# Show random commit message from http://whatthecommit.com/.
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright 2011 by Seungwon Jeong
@bboe
bboe / comment_loop_test.py
Last active June 7, 2021 06:26
Python Reddit API Comment Loop Test
#!/usr/bin/env python3
import logging
import sys
import time
import praw
def configure_logging():
logger = logging.getLogger("praw")
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@fredrikhl
fredrikhl / prepare-commit-msg
Last active August 29, 2015 14:00
Cerebrum commit msg hook
#!/bin/sh
#
# branch -> remove /path/to/branch
tag=$( git symbolic-ref HEAD \
| awk -F'/' '{print $NF}' \
| sed 's/^[Cc][Rr][Bb]-\([0-9]\+\)/CRB-\1/' \
)
[ -n "$tag" ] && echo "$tag" >> $1
#!/bin/bash
function list {
for branch in `git branch --remote | awk '{print $1}'`; do
last=`git log $branch | grep Author | head -1 | awk '{print $NF}'`
echo $last $branch
done
}
list | sort
@shaneriley
shaneriley / move_demo.p8
Last active May 22, 2018 20:14
PICO-8 Movement Demo
pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
player = {}
player.x = 5
player.y = 5
player.sprite = 0
player.speed = 2
function move()
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 10, 2024 06:12
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

NES emulator development guide

Overview of document

@mariotacke
mariotacke / README.md
Created March 7, 2017 04:36
Default nginx log format (combined) and grok pattern