Skip to content

Instantly share code, notes, and snippets.

View passalini's full-sized avatar

Pedro Henrique Passalini passalini

  • Campos dos Goytacazes
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@hugomaiavieira
hugomaiavieira / clearCache.sh
Last active October 18, 2023 19:41
Script para limpar o cache do seu Linux
#!/bin/sh
#
# Salve este script no diretório /etc/cron.hourly e dê permissão
# de execução a ele. Desse modo a cada hora sera verificada se a
# porcentagem de memória utilizada pelo sistema atingiu o valor definido
# na variável 'percent'. Caso positivo, o script informará ao kernel
# que este deverá alterar o valor da opção 'drop_caches' para 3.
#
# Mais detalhes: 'man proc' -> /proc/sys/vm/drop_caches.
PATH="/bin:/usr/bin:/usr/local/bin"
@nicinabox
nicinabox / lets split build guide.md
Last active January 28, 2023 04:10
This guide covers building a Let's Split v2.

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

@krsmurata
krsmurata / rails_admin.pt-BR.yml
Created February 16, 2012 13:09 — forked from lribeiro/rails_admin.pt-PT.yml
Portuguese (pt-BR) translation for RailsAdmin 3.2
pt-BR:
views:
admin:
home:
name: Home
pagination:
previous: "« Anterior"
next: "Próximo »"
truncate: "…"
misc:
@dhoelzgen
dhoelzgen / base_controller.rb
Last active October 7, 2021 16:19
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@CampAsAChamp
CampAsAChamp / LetsSplitFlashingGuide.md
Last active February 3, 2021 18:46
Let's Split Flashing Guide for Windows

A Guide to Flashing a Let's Split for Beginners (Windows)


This guide is no longer being updated and instead has moved to GitHub (click and scroll down)


3 Main Steps

  • Setting Up and Installing Software
  • Building your keymap and keyboard firmware
@racheldonovan
racheldonovan / wysihtml5_helper.rb
Created April 18, 2013 21:55
a helper to assit in integration testing (rspec / capybara) wysihtml5 text editors.
module Wysihtml5Helper
def fill_in_wysihtml5(text)
#js must be enabled
page.execute_script("editor.setValue('#{text}')")
end
end