Skip to content

Instantly share code, notes, and snippets.

View dannluciano's full-sized avatar
🏠
Working from home

Dann Luciano dannluciano

🏠
Working from home
View GitHub Profile
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

quick-heroku

Containerized ephemeral heroku-like local environment

Requirements

Usage

@fnando
fnando / README.md
Last active January 3, 2016 08:19
Render templates outside the controller in a Rails app

You templates must live in app/views, as usual. To render it, just use something like below.

Renderer.render(template: "message", locals: {name: "John Doe"});
@jsteiner
jsteiner / database_cleaner.rb
Created January 10, 2014 20:31
Database Cleaner
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, js: true) do
@infoslack
infoslack / testes-invasao.md
Last active December 26, 2015 15:39
Começando com testes de invasão

Segurança da informação

  • Princípios básicos
  • Tipos de ameaças
  • Tipos de ataques
  • Proteção
  • Serviços

Teste de invasão

@plentz
plentz / nginx.conf
Last active April 19, 2025 04:46
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@fnando
fnando / giffy
Last active July 1, 2020 02:30
Export video files as GIF
#!/usr/bin/env bash
if [[ ! -f "$1" ]]; then
echo "=> Movie file not found"
exit 1
fi
tempfile=/tmp/output.gif
rm -f $tempfile
@steveklabnik
steveklabnik / test.txt
Created April 25, 2013 19:55
Lots of gems throw warnings!
$ rake test
/opt/rubies/2.0.0-p0/bin/ruby -I"lib:test" -w -I"/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib" "/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_test_loader.rb" "test/map_stream_test.rb" "test/map_test.rb" "test/merge_test.rb" "test/mvp_test.rb" "test/on_value_test.rb" "test/select_test.rb"
/Users/steve/.gem/ruby/2.0.0/gems/simplecov-html-0.7.1/lib/simplecov-html.rb:57: warning: assigned but unused variable - title_id
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:66: warning: `&' interpreted as argument prefix
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:72: warning: `&' interpreted as argument prefix
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:157: warning: assigned but unused variable - message
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:167: warning: assigned but unused variable - message
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/response.
@fnando
fnando / Vagrantfile
Created April 18, 2013 12:06
My current Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "hellobits"
config.vm.synced_folder ".", "/Projects", id: "vagrant-root"
forward_port = ->(guest, host = guest) do
config.vm.network :forwarded_port,
guest: guest,