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 / sizes.js
Created October 30, 2016 23:56
react-native responsive
import { Dimensions } from 'react-native';
export const { height, width } = Dimensions.get('window');
const ratioX = width <= 375 ? (width <= 320 ? 0.75 : 0.875) : 1 ;
const ratioY = height <= 568 ? (height <= 480 ? 0.75 : 0.875) : 1 ;
const base_unit = 16;
const unit = base_unit * ratioX;
@sirgalleto
sirgalleto / hosts
Last active October 21, 2016 20:06
github hosts
# /etc/hosts
192.30.253.112 http://github.com
192.30.253.119 http://gist.github.com
151.101.44.133 http://assets-cdn.github.com
@sirgalleto
sirgalleto / index.html
Created October 14, 2016 21:29
Chrome render fail
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Hello
</title>
<style media="screen">
body {
background-color: #ffb949;
@sirgalleto
sirgalleto / email.model.ts
Created October 9, 2016 04:03
Model example
/* tslint:disable */
export interface EmailInterface {
to: string;
from: string;
subject: string;
text?: string;
html?: string;
id?: number;
}
@sirgalleto
sirgalleto / keybase.md
Created September 14, 2016 18:25
keybase.md

Keybase proof

I hereby claim:

  • I am sirgalleto on github.
  • I am sirgalleto (https://keybase.io/sirgalleto) on keybase.
  • I have a public key whose fingerprint is 4B78 4602 3D15 BE95 AAEC 06AF 6255 1ACF D6E1 8B27

To claim this, I am signing this object:

@sirgalleto
sirgalleto / index.html
Last active September 13, 2016 21:41
Cat clicker for udacity javascript patterns course
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cat clicker</title>
</head>
<body id="body">
<script src="index.js"></script>
</body>
@sirgalleto
sirgalleto / local.laziload.js
Last active January 22, 2017 11:38
Localize
let dictionary = {
es: {
welcome: 'Bienvenido!'
},
en: {
welcome: 'Welcome!'
}
};
function localize(){
@sirgalleto
sirgalleto / wwdc216.itermcolors
Created July 21, 2016 17:02
wwdc216 iterm preset
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.39215686917304993</real>
@sirgalleto
sirgalleto / gulpfile.js
Created July 13, 2016 03:53
Angular Gulp tasks
'use strict';
var gulp = require('gulp-help')(require('gulp'))
, templateCache = require('gulp-angular-templatecache')
, browserSync = require('browser-sync').create()
, uglify = require('gulp-uglify')
, gulpsync = require('gulp-sync')(gulp)
, cssmin = require('gulp-cssmin')
, rename = require('gulp-rename')
, concat = require('gulp-concat')
@sirgalleto
sirgalleto / index.html
Last active June 30, 2016 20:58
WizeLine challenge
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Challenge</title>
<style media="screen">
ol > li:nth-child(3n){
list-style-type: none;
}
ol > li:nth-child(5n){