Skip to content

Instantly share code, notes, and snippets.

View pacuna's full-sized avatar

Pablo Acuña pacuna

  • Spotify
  • Austin, TX
View GitHub Profile
@santiblanko
santiblanko / Gruntfile.js
Created June 29, 2014 07:14
My gruntfile for laravel packages
module.exports = function(grunt) {
grunt.initConfig({
neuter: {
app: {
options: {
filepathTransform: function (filepath) {
return './src/assets' + '/' + filepath;
}
@toshimaru
toshimaru / jquery-scroll-bottom.js
Last active May 31, 2022 10:55
Detect the scrolling to bottom of the page using jQuery.
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});
@molotovbliss
molotovbliss / terminalrc
Created December 14, 2017 08:41
Dracula Theme for XFCE4 Terminal
ColorBackground=#28282a2a3636
ColorForeground=#f8f8f8f8f2f2
ColorSelection=#363639394848
ColorBold=#f4f47676c3c3
ColorCursor=#5050fafa7b7b
TabActivityColor=#5050fafa7b7b
ColorPalette=#000000000000;#9a9a40404646;#90907979b3b3;#929298986363;#3d3d98985a5a;#9a9a53538282;#3a3a4d4d5b5b;#8bfc8bfc8ccc;#4d4d4d4d4d4d;#ffff55555555;#cacaa9a9fafa;#f1f1fafa8c8c;#5050fafa7b7b;#ffff7979c6c6;#8b8be9e9fdfd;#f8f8f8f8f2f2
ColorSelectionUseDefault=FALSE
ColorBoldUseDefault=FALSE
@nf
nf / vm-setup.sh
Last active June 14, 2023 22:08
Script for setting up Debian Jessie VM with my development environment
#!/bin/bash -e
echo '
PATH=$HOME/go/bin:$PATH
export GOPATH=$HOME
export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg
export EDITOR=vim
' >> ~/.profile
sudo apt-get update
@brianz
brianz / install-docker.sh
Last active July 7, 2023 07:32
Install docker on Amazon Linux
#!/bin/bash
#
# steps taken verbatim from:
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html#install_docker
#
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# log out and log in to pickup the added group
@davidpelayo
davidpelayo / mbox-to-csv.py
Created March 3, 2016 21:28
Simple mbox parser to csv in Python
import mailbox
import csv
writer = csv.writer(open("mbox-output.csv", "wb"))
for message in mailbox.mbox('file.mbox/mbox'):
writer.writerow([message['message-id'], message['subject'], message['from']])
@marshyon
marshyon / main.go
Last active September 20, 2023 05:59
Golang badger db using GOB to serialise object data into badger fields
/*
*
* Golang badger db using GOB to serialize object data into badger fields
*
* Golang has its very own serializer / deserializer - Go Object (gob) so why not use it where data passed is entirely within a Go
* application ?
*
* JSON or some other text based solution could be used but gob might be faster.
*
* A gob encoder accepts the type bytes.Buffer to encode data to, so to write this to Badger, which accepts the type byte
@whistler
whistler / import.sh
Created March 16, 2015 17:31
Copy files to another repository while saving git history
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
git clone <git repository A url> # clone source repository
cd <git repository A directory>
git remote rm origin # to make sure it doesn't affect the original repository
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed)
mv * <directory 1>
git add .
git commit
@kainam00
kainam00 / rvm-amazon-linux.bash
Created July 31, 2015 15:31
Install RVM on Amazon Linux
#!/bin/bash
# Install prerequisites
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel ruby-devel gcc-c++ jq git
# Import key
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
# Install RVM
curl -sSL https://get.rvm.io | bash -s stable --ruby
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.