Skip to content

Instantly share code, notes, and snippets.

Tiago Scolari tscolari

Block or report user

Report or block tscolari

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tscolari
tscolari / thinking_sphinx.rake
Last active May 25, 2017
Thinking-Sphinx Run in Foreground Task
View thinking_sphinx.rake
namespace :ts do
desc "Run Thinking Sphinx in the foreground (for something like foreman)"
task :run_in_foreground => ['ts:stop', 'ts:index'] do
config = ThinkingSphinx::Configuration.instance
controller = config.controller
unless pid = fork
exec "#{controller.bin_path}#{controller.searchd_binary_name} --pidfile --config #{config.configuration_file} --nodetach"
end
View keybase.md

Keybase proof

I hereby claim:

  • I am tscolari on github.
  • I am tscolari (https://keybase.io/tscolari) on keybase.
  • I have a public key ASCPk16ZmFHhOXCsairlvFGm41u4ofUox8XpKo0XYa4QuQo

To claim this, I am signing this object:

View ops-cf.yml
system_domain:
consul_agent:
certificate:
private_key:
ca:
consul_encrypt_key:
consul_server:
certificate:
private_key:
loggregator_tls_metron:
@tscolari
tscolari / check_bit.go
Created Jul 12, 2016
sample to check if the `n` bit of a `a` byte is true or false
View check_bit.go
package main
import (
"fmt"
)
func main() {
var a byte
a = 0x02
fmt.Printf("%08b\n", a)
View tmux.conf
# Ring the bell if any background window rang a bell
set -g bell-action any
bind-key ^D detach-client
# Create splits and vertical splits
bind-key v split-window -h
bind-key ^V split-window -h
bind-key s split-window
bind-key ^S split-window
View flaky_tests.md
  • emits crash events and reports as 'crashed' after enough crashes -> apps/crashing_test.go:49
View manifest-f3db9f5edc6ee160cee6b8e567a41038.json
{"assets":{"price_per_week.js":"price_per_week-8b9f7aaab66b3f82f1c325bf249b3e73.js","maps/tuscany_map.js":"maps/tuscany_map-8c6d4b3ae9170f529cf6b55f76b383b3.js","jquery.tooltip.js":"jquery.tooltip-6141ab6d271d8fa94d75765e63f90443.js","i18n/grid.locale-mne.js":"i18n/grid.locale-mne-eb8ef319d9c9c06e0b5298d19c2e8c40.js","i18n/grid.locale-da.js":"i18n/grid.locale-da-43625072a537ea08c59f8e4b01ddfa2f.js","admin/bootstrap-modal.js":"admin/bootstrap-modal-9a51ee001fcfe417676aea290e1a57a6.js","jquery-1.7.1.min.js":"jquery-1.7.1.min-133b9bbc16ab947eefce2f3142afa268.js","jquery.ui.stars.min.js":"jquery.ui.stars.min-84576934b4ab2fa4b3bafaf0fb10430f.js","i18n/grid.locale-pt.js":"i18n/grid.locale-pt-121341d16d5508260b3cc48ff0033a97.js","admin/googleMapUI.js":"admin/googleMapUI-a8912a0b28d1c505dba92df2141242ab.js","ZeroClipboard.min.js":"ZeroClipboard.min-f52a36d117562783a4d627563b044d0f.js","pms/properties/property_layout.js":"pms/properties/property_layout-27aa79ab5491d5f40c26d74157e3b42b.js","pms/properties/location_auto
View headlines.js
$.sceditor.command.set(
"h1",
{
exec: function(content) {
"[h1]"+content+"[/h1]"
},
txtExec: ["[h1]", "[/h1]"]
}
)
@tscolari
tscolari / aa.md
Created Jul 26, 2013
Work in progress
View aa.md
  • Avoids files with debugger/binding.pry to be commited
  • Avoids files with spaces in the end of the line to be commited

Instalation

  • Copy the file to .git/hooks/pre-commit
  • Make it executable chmod + x .git/hooks/pre-commit
  • Have fun
You can’t perform that action at this time.