Skip to content

Instantly share code, notes, and snippets.

View dvinciguerra's full-sized avatar
:octocat:
Bite my shine metal class!!!

Daniel Vinciguerra dvinciguerra

:octocat:
Bite my shine metal class!!!
View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple;
# constants
use constant {
TMPDIR => '/tmp',
NSFILE => '/tmp/ddns.ip'
@dvinciguerra
dvinciguerra / 0_README.md
Created January 12, 2017 10:25 — forked from netzpirat/0_README.md
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@dvinciguerra
dvinciguerra / index.html
Created February 15, 2017 17:18 — forked from anonymous/index.html
RubyJobsBrazil RubyJobsBrazil é o lugar para quem quer encontrar ou divulgar sua oportunidade de trabalho relacionada a Ruby // source http://jsbin.com/gadomez
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="RubyJobsBrazil é o lugar para quem quer encontrar ou divulgar sua oportunidade de trabalho relacionada a Ruby">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>RubyJobsBrazil</title>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
require 'mina/git'
require 'json'
set :domain, '0.0.0.0'
set :user, 'nodejs'
set :deploy_to, '/home/nodejs/api'
set :repository, 'git@.../api.git'
set :branch, 'master'
set :shared_paths, [ 'tmp' ]
set :term_mode, :pretty
@dvinciguerra
dvinciguerra / gist:c43eb996308f5f19c2a7e62060a050c4
Created September 22, 2017 12:41 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@dvinciguerra
dvinciguerra / 42-things.md
Created May 25, 2018 19:55 — forked from xdite/42-things.md
Ten (42) Things You Didn't Know Rails Could Do
@dvinciguerra
dvinciguerra / default_rails_template.rb
Created October 31, 2018 19:33 — forked from rujmah/default_rails_template.rb
Generally, default rails template using mongoid, rspec and cucumber.
generators = []
puts 'Spinning up a new app, captain!'
run 'rm public/index.html'
run 'rm public/images/rails.png'
run 'rm README'
run 'touch README'
gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
@dvinciguerra
dvinciguerra / rails-docker-pg-template.rb
Created December 8, 2018 11:12 — forked from cblunt/rails-docker-pg-template.rb
A simple Rails application configured for PostgreSQL and Docker
generate(:scaffold, "post", "title:string", "body:text")
route "root to: 'posts#index'"
file 'config/database.yml', <<-CODE
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
host: db
@dvinciguerra
dvinciguerra / gist:f2af35d90aaa792af246f8df41ac1c85
Created August 22, 2019 11:45 — forked from bessarabov/gist:674ea13c77fc8128f24b5e3f53b7f094
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
@dvinciguerra
dvinciguerra / gist:750a022661d4e3904420be8e85791444
Last active September 10, 2021 16:55 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing To localhost (127.0.0.1)

Available Wildcarded DNS Domains

It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any top level domain below and any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!

  • *.fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6
  • localtest.me - Also has an SSL cert - see http://readme.localtest.me
  • 127-0-0-1.org.uk
  • vcap.me
  • yoogle.com
  • lvh.me