Skip to content

Instantly share code, notes, and snippets.

@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active April 19, 2024 11:13
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@rumpelsepp
rumpelsepp / install-pacaur.sh
Last active November 20, 2022 13:04
A small script for arch linux which builds and installs "pacaur" automatically
#!/usr/bin/bash -l
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2017 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@chapel
chapel / About.md
Last active October 15, 2016 15:15
Discourse topic list customizations for http://discourse.wastingyourlife.co
obj-m += rootkit.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@eevee
eevee / spabs.md
Last active February 20, 2024 08:29
tabs to spaces
anonymous
anonymous / gist:4466934
Created January 6, 2013 12:55
.conkyrc
background no
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
@jakimowicz
jakimowicz / redmine gitlab sync
Created November 15, 2012 16:22
simple (and dirty) sync between redmine issues and gitlab issues
#!/usr/bin/env ruby
require 'faraday'
require 'json'
require 'gitlab'
module Redmine
Host = nil
APIKey = nil
@torsten
torsten / fix-whitespace.sh
Created September 12, 2012 13:58
Pre-commit hook script for git to fix whitespace and long lines.
#!/bin/sh
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length.
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@ykessler
ykessler / gae_handler.py
Created May 11, 2012 20:23
Python logging handlers
class GAEHandler(logging.Handler):
"""
Logging handler for GAE DataStore
"""
def emit(self, record):
from google.appengine.ext import db
class Log(db.Model):
name = db.StringProperty()
@ykarikos
ykarikos / gist:2405068
Created April 17, 2012 10:08
Git log analysis
# List amount of commits in git repository per month and author
git log --pretty='format:%ad %ae' --date=short | sed 's/@.*//'| cut -b -7,11- |sort |uniq -c |awk '{ printf "%s %30s ", $2, $3; count=int($1/2); for(i=0; i<count; i++) { printf "*" } printf "\n"; }'
# List amount of commits on different times of day
git log --pretty='format:%ad' --date=iso | cut -b 12-13|sort |uniq -c|awk '{ printf "%s %30s ", $2, $3; count=int($1/2); for(i=0; i<count; i++) { printf "*" } printf "\n"; }'
# Find inhumane commit times
git log --pretty='format:%ad %ae %s' --date=iso | egrep -v "^2012-[0-9-]* ([12]|0[7-9])"