Skip to content

Instantly share code, notes, and snippets.

View fmquaglia's full-sized avatar
🎯
Focusing

Fabricio Quagliariello fmquaglia

🎯
Focusing
  • Ciudad Autónoma de Buenos Aires, Argentina
View GitHub Profile
@raddeus
raddeus / app.js
Last active February 4, 2025 09:42
Basic Express 4.0 Setup with connect-flash
var express = require('express');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var flash = require('connect-flash');
var app = express();
app.use(cookieParser('secret'));
app.use(session({cookie: { maxAge: 60000 }}));
app.use(flash());
D/CordovaActivity(18223): onMessage(onPageStarted,file:///#!/sites)
D/CordovaLog(18223): file:///#!/sites: Line 1 : Uncaught ReferenceError: start is not defined
D/CordovaLog(18223): file:///#!/sites: Line 2 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 3 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 4 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 5 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 6 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 7 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 8 : Uncaught ReferenceError: addRow is not defined
D/CordovaLog(18223): file:///#!/sites: Line 9 : Uncaught ReferenceError: addRow is not defined
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@stevekinney
stevekinney / method_missing.js
Last active February 27, 2020 08:11
Ruby's `method_missing` implemented in JavaScript using ES6 proxies.
// This will only work in environments that support ES6 Proxies.
// As of right now, that's pretty much only Firefox.
function Refrigerator(foods) {
this.foods = foods;
return new Proxy(this, {
get: function (receiver, name) {
if (name in receiver) {
@mturnwall
mturnwall / SassMeister-output.css
Last active May 6, 2020 18:54
SASS mixin for styling input placeholder text
::-moz-placeholder {
color: red;
font-weight: 300;
padding-top: 5px;
}
::-webkit-input-placeholder {
color: red;
font-weight: 300;
padding-top: 5px;
@dac09
dac09 / provide_constant.js
Created October 7, 2014 23:03
Constants in Jasmine unit tests
describe('Test', function() {
beforeEach(function() {
module('App', function($provide) {
$provide.constant('CSRF_TOKEN', 'MOCK_CONSTANT'); // <= mock your constant
});
});
// Tests go here
@edvinasbartkus
edvinasbartkus / gist:0e99ea8305a20737f562
Last active May 20, 2022 11:08
Ruby puma.gem install on El Capitan / Mac Sierra
gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 29, 2025 02:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

anonymous
anonymous / scrapfy-hRgXrl7Du2aLHIC.rb
Created October 1, 2015 20:05
Another Scrap from scrapfy.io
class AccountDictionary
QUERY = "Select Id, Name from Account".freeze
def initialize data_store
@redis = Ost.redis
@key = "accounts:#{data_store.id}"
@sf_api = data_store.owner.credential_for(data_store.id).api # Angelica!!!
end
@wchargin
wchargin / Vex.jsx
Created December 10, 2015 07:15
proof-of-concept: rendering musical notes in React
import Vex from 'vexflow';
import React, {Component} from 'react';
const {
Accidental,
Formatter,
Stave,
StaveNote,
Renderer,