Skip to content

Instantly share code, notes, and snippets.

View peterhellberg's full-sized avatar
💙
Coding Go

Peter Hellberg peterhellberg

💙
Coding Go
View GitHub Profile
@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@mislav
mislav / geoip_service.rb
Created September 3, 2012 11:48
Simple GeoIP service class using freegeoip.net and Faraday
require 'faraday_middleware'
require 'hashie/mash'
# Public: GeoIP service using freegeoip.net
#
# See https://github.com/fiorix/freegeoip#readme
#
# Examples
#
# res = GeoipService.new.call '173.194.64.19'
@mislav
mislav / install.sh
Last active December 19, 2015 15:49
Test-drive the new vim 7.4 prerelease
cd /tmp
wget ftp://ftp.vim.org/pub/vim/unstable/unix/vim-7.4a.tar.bz2 -O- | tar -xj
cd vim74a
sudo mkdir -p /opt/vim
sudo chown $USER /opt/vim
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure --prefix=/opt/vim --enable-rubyinterp | grep ruby
make && make install
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@deingithub
deingithub / zig.lang
Created October 4, 2019 17:08
Zig Highlighting for GTKSourceView (gedit and a bunch of other GTK+ apps)
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Zig Syntax Highlighting for GTKSourceView components.
Author: deing <[email protected]>. This file is available under Creative Commons Zero.
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
@peterhellberg
peterhellberg / build.zig
Last active June 30, 2020 09:50
sdl-zig-demo (https://github.com/andrewrk/sdl-zig-demo) made to work with zig 0.6.0
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("sdl-zig-demo", "src/main.zig");
exe.setBuildMode(mode);
exe.linkSystemLibrary("SDL2");
exe.linkSystemLibrary("c");
exe.install();