Skip to content

Instantly share code, notes, and snippets.

View sirgalleto's full-sized avatar
💛
JavaScript de libre pastoreo

Sebastián Osorio sirgalleto

💛
JavaScript de libre pastoreo
View GitHub Profile
@sirgalleto
sirgalleto / index.html
Created May 31, 2020 20:07
Web development
<span>test</span>
@sirgalleto
sirgalleto / request.md
Created July 11, 2019 18:06
Arguments to request help to any conference

Hi company,

@sirgalleto
sirgalleto / commit-msg
Last active December 3, 2018 19:00
PRs vemos rolas no sabemos scripts
#!/usr/bin/env node
const fs = require('fs')
const spotify = require('spotify-node-applescript')
const message = fs.readFileSync(process.argv[2], { encoding: 'utf8' })
spotify.getTrack((err, track) => {
const trackData = formatTrackData(track)
@sirgalleto
sirgalleto / bootstrap-breakpoints.sass
Created July 3, 2018 15:14 — forked from webinfinita/bootstrap-breakpoints.sass
Variables for responsive design in bootstrap with sass
@mixin breakpoint($point)
@if $point == lg
@media (min-width: 1200px)
@content
@else if $point == md
@media (min-width: 992px) and (max-width: 1199px)
@content
@else if $point == sm
@sirgalleto
sirgalleto / docker-compose.yml
Created October 10, 2017 17:02
Docker compose example
version: '3'
services:
web:
build: .
ports:
- 80:80
- 3306:3306
volumes:
- ./directory:/directory
redis:
@sirgalleto
sirgalleto / consolePollo.js
Last active June 14, 2017 17:45
Pollofill
console.pollo = function(arg) {
console.countPollo = (console.countPollo || 0) + 1;
console.debug(console.countPollo, 'POLLO', arg);
}
@sirgalleto
sirgalleto / ModelDescription.js
Created February 15, 2017 00:06
Strong SOAP
// Method to save a json object schema
function saveJsonDescription(client, service) {
const fileDestination = './';
const description = client.describe();
const serviceJobListDescription = description.RTIServiceOrderService.RTIServiceOrderPort[service].input.body;
jsonfile.writeFile(`${fileDestination}${service}.schema.json`, serviceJobListDescription, function (err) {
if(err) throw new Error(err);
});
}
@sirgalleto
sirgalleto / Auth.js
Created December 19, 2016 19:11
Authorization + Rest interactions for react-native
import { AsyncStorage } from 'react-native';
import EventEmmiter from 'EventEmitter';
import { apiRouter } from './services';
import { headers, access } from '../constants';
export class Auth extends EventEmmiter{
key = '@gos3s1on';
constructor() {
@sirgalleto
sirgalleto / uid.js
Created November 16, 2016 00:20
UID 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' format
_uid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
}
// Write a function that receives an integer and returns its string representation
// 1 -> Uno
// 12 -> Doce
// 17 -> Diecisiete // Diez y siete
// 23 -> Veintitres
// 57 -> Cincuenta y siete
// 158 -> Ciento cincuenta y ocho
// 2347 -> Dos mil trescientos cuarenta y siete
// 0 < n < 10,000 (1-9999)