Skip to content

Instantly share code, notes, and snippets.

Avatar

Juan Lupion pantulis

View GitHub Profile
View ethereum rinkeby poc
0x5b169DdCbf057c7518a29D7ff7b0cc1dEB76ff16
@pantulis
pantulis / gist:8b920e44020773f59d01
Created Feb 2, 2016
Spacemacs snippet to remap special keys
View gist:8b920e44020773f59d01
(defun dotspacemacs/user-config ()
"Configuration function for user code.
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(global-set-key [(M +)] "]")
(global-set-key [(M ?\ç)] "}")
(global-set-key [(M \1)] "|")
(global-set-key [(M \2)] "@")
@pantulis
pantulis / .htaccess
Created Aug 30, 2014
Fichero .htaccess a editar (ojo con el .!)
View .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !(.*)png$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.html [L,QSA]
@pantulis
pantulis / gist:5460679
Created Apr 25, 2013
Prueba de carga en CouchDB y búsqueda por tags en ElasticSearch.
View gist:5460679
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'rubygems'
require 'json/ext'
require 'couchrest'
require 'tire'
require 'yajl/json_gem'
require 'faker'
View gist:598685
# Get the official Emacs repo:
git clone http://repo.or.cz/r/emacs.git/
# Get the fullscreen patch
git remote add typester git://github.com/typester/emacs.git
git fetch typester
# Create a patch and apply to HEAD
# I had merge conflicts when rebasing and
# build failures for origin/emacs-23
View gist:165693
juan@Manzanito ~/Documents
$ irb
>> require 'time'
=> true
>> Time.now
=> Tue Aug 11 10:08:07 +0200 2009
>> Time.parse("17:00 PST")
=> Wed Aug 12 03:00:00 +0200 2009
>>
View myrackfilter.rb
class MyRackFilter
def initialize(app, logger = nil)
@app = app
@logger = logger
end
def call(env)
@logger.debug("Hit, hit!")
status, headers, response = @app.call(env)
end
View gist:30430
ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: blogs: SELECT * FROM "blogs" ):
/app/controllers/blogs_controller.rb:5:in `index'
thin (0.6.4) lib/thin/connection.rb:35:in `process'
thin (0.6.4) lib/thin/connection.rb:23:in `receive_data'
eventmachine (0.10.0) lib/eventmachine.rb:1056:in `event_callback'
eventmachine (0.10.0) lib/eventmachine.rb:224:in `run_machine'
eventmachine (0.10.0) lib/eventmachine.rb:224:in `run'
thin (0.6.4) lib/thin/server.rb:113:in `start'
thin (0.6.4) lib/thin/controllers/controller.rb:59:in `start'
thin (0.6.4) lib/thin/runner.rb:143:in `send'
View gist:30341
ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: blogs: SELECT * FROM "blogs" ):
/app/controllers/blogs_controller.rb:5:in `index'
thin (0.6.4) :lib/thin/connection.rb:35:in `process'
thin (0.6.4) :lib/thin/connection.rb:23:in `receive_data'
eventmachine (0.10.0) :lib/eventmachine.rb:1056:in `event_callback'
eventmachine (0.10.0) :lib/eventmachine.rb:224:in `run_machine'
eventmachine (0.10.0) :lib/eventmachine.rb:224:in `run'
thin (0.6.4) :lib/thin/server.rb:113:in `start'
thin (0.6.4) :lib/thin/controllers/controller.rb:59:in `start'
thin (0.6.4) :lib/thin/runner.rb:143:in `send'
View gist:30299
Processing BlogsController#index (for 127.0.0.1 at 2008-11-29 21:00:06) [GET]
Blog Load (0.0ms) SQLite3::SQLException: no such table: blogs: SELECT * FROM "blogs"
ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: blogs: SELECT * FROM "blogs" ):
/app/controllers/blogs_controller.rb:5:in `index'
/opt/local/lib/ruby/gems/1.8/gems/thin-0.6.4/lib/thin/connection.rb:35:in `process'
/opt/local/lib/ruby/gems/1.8/gems/thin-0.6.4/lib/thin/connection.rb:23:in `receive_data'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:1056:in `event_callback'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:224:in `run_machine'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:224:in `run'