Skip to content

Instantly share code, notes, and snippets.

View zundr's full-sized avatar

José Antonio Pérez Sánchez zundr

View GitHub Profile
@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux
@jsoriano
jsoriano / Vagrantfile
Last active July 14, 2016 15:00
Small example with vagrant, docker and Digital Ocean
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Quick start:
# - vagrant plugin install vagrant-digitalocean
# - Set-up ~/.digital_ocean.rb like this:
# module DigitalOceanKeys
# CLIENT_ID = 'foooooooo'
# API_KEY = 'fabada'
# end
@burke
burke / remotepaste.md
Last active April 18, 2025 03:35
This sets up keybindings in tmux that allow you to copy/paste to/from your OS X clipboard from tmux running inside an SSH connection to a remote host. Partially borrowed from http://seancoates.com/blogs/remote-pbcopy

Local (OS X) Side

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>localhost.pbcopy</string>
@kaja47
kaja47 / gist:4407844
Created December 29, 2012 16:19
React.PHP promise timeout
<?php
use React\Promise\Deferred;
function timeout($time, $promise, $loop) {
$defer = new Deferred;
$r = $defer->resolver();
$sig = $loop->addTimer($time, function() use($r) {
$r->reject('timeout');
});
@benizi
benizi / simpler
Created November 30, 2012 05:26 — forked from justinabrahms/colortest.py
Show how different terminals show bold colors
#!/bin/sh
# Print four lines showing blocks of colors: 0-7 | 0-7bold | 8-15 | 8-15bold
perl -CADS -lwe '
my $block = shift || (chr(0x2588) x 3);
for (["", 0], ["1;", 0], ["", 8], ["1;", 8]) {
my ($bold, $offset) = @$_;
my @range = map $offset + $_, 0..7;
printf "%s %-6s ", $bold ? "bold" : "norm", "$range[0]-$range[-1]";
print map("\e[${bold}38;5;${_}m$block", @range), "\e[0m"
}
@zundr
zundr / dotfiles-installer.sh
Last active October 9, 2015 05:48
dotfiles installer functions
function msg() {
local color="\033[${1}m"
local message=$2
local normal="\033[0m"
echo -e "${color}${message}${normal}"
}
function link_files() {
local source_dir=$1
local pattern=$2
@voyeg3r
voyeg3r / gist:1547918
Created January 1, 2012 17:58
The ultimate Arch Linux install script
#!/bin/bash
#-------------------------------------------------------------------------------
#Created by helmuthdu mailto: helmuthdu[at]gmail[dot]com
#Inspired by Andreas Freitag, aka nexxx script
#-------------------------------------------------------------------------------
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
@koshigoe
koshigoe / mount-ram.sh
Created February 11, 2011 14:57
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@ArtemGr
ArtemGr / alternative, using regex
Created May 21, 2009 16:29
CSV parser in Scala
val pattern = java.util.regex.Pattern.compile ("""(?xs) ("(.*?)"|) ; ("(.*?)"|) (?: \r?\n | \z ) """)
val matcher = pattern.matcher (input)
while (matcher.find) {
val col1 = matcher.group (2)
val col2 = matcher.group (4)
// ...
}