Skip to content

Instantly share code, notes, and snippets.

View gimenete's full-sized avatar

Alberto Gimeno gimenete

View GitHub Profile
@ethangunderson
ethangunderson / gist:48e53e388a781a394103
Last active February 10, 2021 16:38
new osx computer setup
osascript -e "tell application \"Terminal\" to set the font size of window 1 to 18"
touch ~/.hushlogin
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install \
asdf \
@RodrigoEspinosa
RodrigoEspinosa / mov-to-gif.sh
Last active February 11, 2020 17:37
Alias for OS X Screencast to animated GIF
mov-to-gif() {
ffmpeg -i $1 -vf "scale=1024:-1:flags=lanczos" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=0 --delay=7 #
}
@zenparsing
zenparsing / dedent-template.js
Last active April 25, 2023 22:16
Dedenting Template Strings
function dedent(callSite, ...args) {
function format(str) {
let size = -1;
return str.replace(/\n(\s+)/g, (m, m1) => {
if (size < 0)
size = m1.replace(/\t/g, " ").length;
@mbigatti
mbigatti / UIColor+RGB.swift
Last active February 14, 2021 07:22
UIColor extension that add a whole bunch of utility functions.
//
// UIColor+RGB.swift
// Copyright (c) 2014 Massimiliano Bigatti. All rights reserved.
//
import Foundation
import UIKit
/**
UIColor extension that add a whole bunch of utility functions like:
@russellbeattie
russellbeattie / io-domains.txt
Last active December 12, 2015 10:39
List of interesting (non-blog or useless) .io domains
http://action.io
http://add.io
http://adstage.io
http://airbrake.io
http://animation.io
http://ansr.io
http://apc.io
http://apiary.io
http://apis.io
http://appetite.io
@delebedev
delebedev / TestSemaphor.h
Last active December 10, 2015 04:18
unit testing of completion blocks
//
// TestSemaphor.h
// BillsApp
//
// Created by Marin Todorov on 17/01/2012.
// Copyright (c) 2012 Marin Todorov. All rights reserved.
//
#import <Foundation/Foundation.h>
@dshaw
dshaw / RealtimeConf2012.md
Created October 29, 2012 17:18
Realtime Conf 2012 Talks
@dshaw
dshaw / RedisConf2012.md
Created October 29, 2012 16:59
Redis Conf 2012 Talks
@sym3tri
sym3tri / MongoDB update all matching.js
Created March 7, 2011 06:15
How to update a single field in a MongoDB collection for all documents matching a specific criteria
// FROM: http://www.mongodb.org/display/DOCS/Updating#Updating-update%28%29
//
// db.collection.update( criteria, objNew, upsert, multi )
// criteria - query which selects the record to update;
// objNew - updated object or $ operators (e.g., $inc) which manipulate the object
// upsert - if this should be an "upsert"; that is, if the record does not exist, insert it
// multi - if all documents matching criteria should be updated
//
// SQL VERSION:
// UPDATE myTable SET dateField = '2011-01-01' WHERE condField = 'condValue'