Skip to content

Instantly share code, notes, and snippets.

View rodcisal's full-sized avatar

Rodrigo Cisternas Albornoz rodcisal

  • Paris
View GitHub Profile
guard 'livereload' do
watch(%r{content/pages(/.+)\.(mdown|textile|haml)}) { |match| match[1] }
watch(%r{public(/.+\.(jpe?g|js|png))}) { |match| match[1] }
watch(%r{views/.+\.haml})
watch(%r{views/.+\.html.erb})
watch(%r{assets/stylesheets/(.+)\.s[ac]ss}) do |match|
if match[1] =~ /(mixins|variables)/
["/css/master.css", "/css/layout.css"]
else
"/css/#{match[1]}.css"

Because somehow I always end up trolling the interwebs looking for a reference for these.

Symbol Code Entity Name
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
@rodcisal
rodcisal / gist:7419dbc464b1427dd0cf
Created November 27, 2014 19:57
Famous micro clearfix
.element:before,
.element:after {
content: " ";
display: table;
}
.element:after { clear: both }
.element { *zoom: 1 }
Error: `/mnt/data/1/node_modules/fibers/bin/linux-x64-v8-3.28/fibers.node` is missing. Try reinstalling `node-fibers`?
at Object.<anonymous> (/mnt/data/1/node_modules/fibers/fibers.js:13:8)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/mnt/data/1/programs/server/boot.js:1:75)
at Module._compile (module.js:460:26)
@rodcisal
rodcisal / gist:f37795fbd80519b4dbcd
Created February 9, 2015 14:28
modulus deployment error
➜ achs-updated git:(master) ✗ modulus deploy
Welcome to Modulus
You are logged in as xxxx@assss.cm
[?] Are you sure you want to use project achs? (yes) yes
Meteor project detected...
Input: /Users/rodrigocisternas/meteor/achs-updated
Output: /Users/rodrigocisternas/meteor/achs-updated/.demeteorized
Determining Meteor version...
Meteor version: 1.0.3.1
Bundling Meteor App...
@rodcisal
rodcisal / gist:bed7e776512e865e633c
Created February 9, 2015 14:59
trying to deploy to a new servo
that.yielded.Dispose();
^
../src/fibers.cc: In static member function 'static v8::Handle<v8::Value> Fiber::New(const int&)':
../src/fibers.cc:223:13: error: request for member 'Length' in 'args', which is of non-class type 'const int'
if (args.Length() != 1) {
^
../src/fibers.cc:9:45: error: 'New' is not a member of 'v8::String'
#define THROW(x, m) return ThrowException(x(String::New(m)))
^
../src/fibers.cc:224:5: note: in expansion of macro 'THROW'
@rodcisal
rodcisal / gist:2201952f0cd9d8affbdb
Created February 17, 2015 15:49
modulus deployment error (again)
➜ meteor modulus deploy
Welcome to Modulus
You are logged in as contacto@upcomunicaciones.com
Please choose which project to use:
1) achs
2) achs-testing
[?] project 1
Selecting achs
Compressing project...
@rodcisal
rodcisal / meteor-react
Created June 28, 2015 18:23
meteor-react
var MyComponent = React.createClass({
mixins: [ReactMeteor.Mixin],
startMeteorSubscriptions: function() {
Meteor.subscribe("players");
},
// Make sure your component implements this method.
getMeteorState: function() {
return {
@rodcisal
rodcisal / gist:2942882
Created June 16, 2012 23:50
Calculadora de IMC on-the-fly
<script type="text/javascript">
function calcular(a,b) {
imc = (a / (b*b));
document.getElementById("resultado").innerHTML = Math.round(imc*10)/10;
if (imc<=19.90) {
document.getElementById("diagnostico").innerHTML= " Desnutrición";
}
else if (imc>19.90 && imc<=25) {
document.getElementById("diagnostico").innerHTML= " Peso Normal";
}