Skip to content

Instantly share code, notes, and snippets.

View bertocq's full-sized avatar

Alberto Calderón Queimadelos bertocq

View GitHub Profile
@vlledo
vlledo / bebanjo.md
Last active August 7, 2019 08:44
Mi primera semana en BeBanjo

Mi primera semana en BeBanjo

¡Hoy finalizo mi primera semana en BeBanjo! Pues sí, imagino que esto será algo inesperado para muchos de los que leáis estas líneas… Después de 8 años trabajando por mi cuenta —junto con mi socio Jesús— esta semana he abierto una nueva etapa. Pocas personas, tan sólo los más allegados y, por supuesto, nuestros clientes, sabían de este cambio; no ha sido una decisión fácil, por eso me gustaría compartir aquí los principales motivos que nos han llevado —hablo en plural porque tanto Jesús como yo dejamos Delirium Coder para pasar a formar parte de BeBanjo— a abandonar nuestra propia empresa, siendo rentable económicamente y en pleno crecimiento, para volver a trabajar por cuenta ajena.

Los últimos 8 años

No me voy a dilatar mucho explicando la historia de Delirium Coder, imagino que será bastante similar a la de todos aquellos que buscando un lugar donde d

@ferblape
ferblape / geolocation.js
Created June 17, 2017 09:35
JQuery free IP geolocation
$(document).ready(function(){
$.getJSON("http://jsonip.com/?callback=?", function (ipData) {
$.getJSON("https://freegeoip.net/json/" + ipData.ip, function (geoData) {
console.log(geoData.city);
});
});
});
@arturoherrero
arturoherrero / deploy_to_heroku.sh
Last active August 29, 2015 14:23
Deploy Rails app to Heroku environments
#!/usr/bin/env bash
deploy_to_production() {
read -p "Are you sure? " -r
if [[ $REPLY =~ ^(yes|y|Y)$ ]]; then
git push production master && heroku run rake db:migrate -a app-production
fi
}
deploy_to_staging() {
@scriptnull
scriptnull / thirugram.js
Last active October 8, 2023 20:02
spam telegram via telegram web
//spam message the chats with thirugram.js
//open up telegram web and go to the chat you want to spam
//open console ( Ctrl + Shift + J )
//execute the code
var message = ""; //spam message
var interval = 1 ; // in seconds
var count = 10 ; //number of times to send
var notifyInterval = 5 ; //notify
var i = 0 ;
var timer = setInterval(function(){

Git Cheat Sheet

Commands

Getting Started

git init

or

@nbfritz
nbfritz / string_timings.rb
Created September 4, 2014 12:22
Using + to spread strings across multiple lines is slower than using \
def timer
start_time = Time.now
1_000_000.times do
yield
end
Time.now - start_time
end
time_a = timer do
x = "this this this this this this this this this this this this this this this " +
// HTML:
<div class="display-type"></div>
// CSS:
// set the content of an element depending on the media query
@vincentmac
vincentmac / sublime-text-osx-context-menu.md
Created September 25, 2013 18:03
Sublime Text OSX Context Menu

Add Sublime Text to OS X Context Menu

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set input to Service receives selected files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set Pass input to as arguments
  • Save as Open in Sublime Text
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@sunny
sunny / git-checkout.rake
Last active August 19, 2022 10:04 — forked from skyriverbend/rails_switch_branch.py
Task to checkout a branch in rails and apply or rollback the migrations between the two.
# encoding: UTF-8
#
# $ rake checkout new_branch_name
#
# Via https://gist.github.com/jonlemmon/4076864
#
# 1. Roll back any migrations on your current branch which do not exist on the
# other branch
# 2. Discard any changes to the db/schema.rb file
# 3. Check out the other branch