Skip to content

Instantly share code, notes, and snippets.

View varaskkar's full-sized avatar

Felipe Delgado varaskkar

  • Spain
View GitHub Profile
arnorhs / bookmarklet-version
Created December 11, 2011 08:28
A simple snippet you can add to your bookmark bar (insert javascript: in front) to measure rendering performance of a state of a webpage
javascript:(function (window,$,runs) { var t = new Date(), i = 1, timetaken,offset = $(window).scrollTop(); $(window).bind('scroll.scrolltest',function () { if (i >= runs) { timetaken = (new Date) - t; console.log('Time taken for '+runs+' scrolls: ',timetaken,' - time per scroll: ', timetaken/runs); $(window).unbind('scroll.scrolltest'); return; } i++; doScroll(); }); function mod (x,y) { return Math.round((x/y - Math.floor(x/y)) *2); } function doScroll () { setTimeout(function(){ $(window).scrollTop(offset + mod(i,2)*100); },0); } doScroll(); })(window,jQuery,500);
jexchan /
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
rajanand02 / tmux.conf
Last active February 3, 2024 07:28
Tmux configurations with status bar theme
# set prefix to control-f
set -g prefix C-f
#unbind system defined prefix
unbind C-b
# helps in faster key repetition
set -sg escape-time 0
# start session number from 1 rather than 0
elindoorn / reserved-web-content-variables.txt
Last active October 13, 2023 14:26
Reserved web content variables
# The MIT License (MIT)
# Copyright (c) 2016 Tiberio A. Santos
# 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 copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
HaleTom /
Last active April 14, 2024 13:35
Print a 256-colour test pattern in the terminal
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See
set -eu # Fail on errors or undeclared variables
Davor111 /
Created February 17, 2017 08:34
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
jcavat / Dockerfile
Last active February 25, 2024 13:58
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
xameeramir / default nginx configuration file
Last active April 15, 2024 09:51
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
VladimirPal / neomuttrc
Last active March 30, 2024 11:59
Minimal neomutt config for gmail imap
set imap_user=""
set imap_pass=`/usr/bin/security find-generic-password -w -a '' -s 'Gmail'`
set folder=imaps://
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# search sleep_time for additional info
set sleep_time=0 # be faster