Skip to content

Instantly share code, notes, and snippets.

View rodcisal's full-sized avatar

Rodrigo Cisternas Albornoz rodcisal

  • Paris
View GitHub Profile
@lucnat
lucnat / Router.jsx
Last active August 21, 2019 00:42
Meteor React-Router Accounts
import { Meteor } from 'meteor/meteor';
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { BrowserRouter, Route, Link, Redirect, withRouter, Switch} from "react-router-dom";
// pages accessible to all users
import Home from './Home';
import Login from './Login';
@pangui
pangui / prevent_double_click.js
Created January 28, 2015 22:06
Prevent double click!
// jQuery plugin to prevent double click
jQuery.fn.preventDoubleClick = function() {
$(this).on('click', function(e){
var $el = $(this);
if($el.data('clicked')){
// Previously clicked, stop actions
e.preventDefault();
e.stopPropagation();
}else{
// Mark to ignore next click
@qwo
qwo / google-tips
Last active January 24, 2024 19:27
Google Recruiter Candidate Tips ..
xxx,
Thanks again for taking the time to speak with me and for sending me your information. I'm excited to tell you that we would like to move forward in the process!
One of our coordinators will be emailing you within the next week from an @google.com domain with the date and time of your phone interview. In the meantime, I've included some preparation materials (below.)
Please note this will be a technical interview that will last for approximately 45 minutes. Google takes an academic approach to the interviewing process. This means that we are interested in your thought process, your approach to problem solving as well as your coding abilities. You may be asked questions that relate to technical knowledge, algorithms, coding, performance, how to test solutions, and perhaps your interest in Google products. The best advice that I can give you is to treat the interview like a conversation, talk through the problems, and please feel free to ask the interviewer if you are not clear with any of the questio
@jdickey
jdickey / HAML error that's driving me nuts.md
Last active January 26, 2016 13:57
index.html.haml that's giving an odd error. Why?

Introduction

The index.html.haml file that follows is from a very basic Rails app meant to demonstrate the convergence of

  • some bespoke Script code (not relevant here; we're not getting that far)
  • Twitter Bootstrap (currently using 3.03; any 3.0+ should be fine with the CSS styles here)
  • posabsolute's jQuery Validation Engine, (hereinafter "jQVE")

This is meant to be used by a Rails (3.2.16) app with Gems haml-rails 0.4 and haml 4.0.4, along with jqVE 2.6.2. The server is Thin 1.6.1.

Errors In My Errors?

@olizilla
olizilla / meet-meteor.md
Last active December 17, 2015 22:48
Developer with ideas, meet Meteor; Meteor meet ideas. Oh look, they've become manifest.

Meet Meteor

The framework for turning ideas into webapps

A full stack web framework

  • Manages client and server side.
  • Things like Rails manage server side issues.
  • Things like Ember & Angular provide front-end structure.
  • Meteor helps out with both.
@olizilla
olizilla / meteor-dump.sh
Last active May 29, 2016 02:18
Dump a mongo db from a live meteor app to a local dump dir.
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred
if (Meteor.is_client) {
var userName = "PatelNachiket";
Template.hello.greeting = function () {
return "Fetch recent tweets from Twitter stream of user : " ;
};
Template.hello.events = {
'click #fetchButton' : function () {
console.log("Recent tweets from stream!");
$('#fetchButton').attr('disabled','true').val('loading...');
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}