Skip to content

Instantly share code, notes, and snippets.

View varaskkar's full-sized avatar

Felipe Delgado varaskkar

  • Spain
View GitHub Profile
@arnorhs
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
jexchan / multiple_ssh_setting.md
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 "your_email@youremail.com"
@rajanand02
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
elindoorn / reserved-web-content-variables.txt
Last active October 13, 2023 14:26
Reserved web content variables
reserved-article-asset-tag-names
reserved-article-author-comments
reserved-article-author-email-address
reserved-article-author-id
reserved-article-author-job-title
reserved-article-author-location
reserved-article-author-name
reserved-article-author-organization
reserved-article-create-date
reserved-article-description
#!/bin/bash
# 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
HaleTom / print256colours.sh
Last active April 14, 2024 13:35
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@Davor111
Davor111 / sshuttle.sh
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 user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
@jcavat
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
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.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# 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
VladimirPal / neomuttrc
Last active March 30, 2024 11:59
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster