Skip to content

Instantly share code, notes, and snippets.

View frostyfrog's full-sized avatar
🚩

Frostyfrog frostyfrog

🚩
View GitHub Profile
@3v1n0
3v1n0 / bzr-cherry-pick
Last active October 4, 2018 18:54
A tool for cherry-picking revisions from bazaar repositories
#!/bin/bash
#
# Simply cherry picks a revision from a bazaar branch, cloning its metadata
#
# Usage:
# bzr-cherry-pick lp:unity 1234
if ! (bzr root &> /dev/null); then
echo "It seems you're not in a bazaar branch directory"
exit 1
@varver
varver / cookie_jar_golang.go
Last active June 7, 2022 13:04
Login to a website with this golang code using persistent cookies or cookie jar .
@paolorossi
paolorossi / html5-video-streamer.js
Created March 7, 2012 13:21
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
# Makefile template for a shared library in C
# https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/
CC = gcc # C compiler
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = libtarget.so # target lib
SRCS = main.c src1.c src2.c # source files
@antimatter15
antimatter15 / algorithm.pseudo
Created February 16, 2012 03:22
Pseudocode to Graphviz Converter
Place phone call.
Home?
Leave message
Wait for callback
"Would you like to share a meal"
"Would you like to share a meal"
What is the response (A) ?
"Do you enjoy a hot beverage"
What is the response (B) ?
n = 0
@avalanche123
avalanche123 / Makefile
Created October 18, 2011 23:39
new PHP project Makefile
# Makefile for php project setup
#
# You can set these variables from the command line.
AUTHOR = Author
PROJECT = Project
BUILDFILE = project.phar
SRCDIR = src
TESTDIR = tests
PHPUNITCONFIG = phpunit.xml.dist
@grumpymaker
grumpymaker / gist:940095
Created April 25, 2011 02:57
Simple IRC Bot in Ruby
require 'rubygems'
require 'ponder'
require 'wikipedia'
@ponder = Ponder::Thaum.new
@ponder.configure do |c|
c.nick = 'FUN_BOT'
c.username = 'FUN_BOT'
c.real_name = 'FUN_BOT'