This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-parse HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<footer class="clearfix"> | |
<p>Created by <a href="mailto:[email protected]">Kenny Meyer</a> | |
<% cache do %> | |
(HEAD: <%= git_version %>) | |
<% end %> | |
</p> | |
</footer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def git_version | |
require 'grit' | |
repo = Grit::Repo.new(Rails.root + '.git') | |
# For the sake of brevity just display the first 6 chars of the commit id | |
last_commit = repo.commits.first.id[0..5] | |
#{last_commit} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Some CSS here */ | |
<% unless Rails.env.test? %> | |
@import "font-awesome"; | |
<% end %> | |
/* More CSS here */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
test: | |
adapter: sqlite3 | |
database: db/test.sqlite3 | |
pool: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
1. Connect to database. | |
2. Fetch 100 records from database. | |
3. Make curl PUT request to Elastic Search server | |
*/ | |
$DB_NAME = "abc"; | |
$DB_SCHEMA = ""; | |
$DB_TABLE = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed under DO-WHATEVER-THE-FUCK-YOU-WANT-WITH-THIS-CODE license. | |
# Self-explanatory. | |
# What this script does: | |
# | |
# 1. Request clasipar.com section inmuebles alquiler in Asuncion | |
# 2. Parse request | |
# 3. Parse all 'clasificados' | |
# 4. Write them to a file, and append new ones to the top. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SampleController < ApplicationController | |
respond_to :json | |
def index | |
@nodes = Node.all | |
render :json => @nodes.to_json, :callback => params[:callback] | |
end | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.rubyquiz.com/quiz2.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Lee el nombre de un archivo como primer argumento | |
for i in `more $1 ` | |
do | |
# Generar un nuevo pass con `pwgen` | |
pass=`pwgen -1 -N 1` | |
# Cambiar contrasenha | |
echo $pass|passwd $i --stdin > /dev/null | |
# Imprimir usuario y pass |