Skip to content

Instantly share code, notes, and snippets.

View diestrin's full-sized avatar

Diego Barahona diestrin

View GitHub Profile
@diestrin
diestrin / scripts.jade
Created May 8, 2013 21:49
Yeoman - Jade import files
// build:js(.tmp) scripts/scripts.js
//- Modules
script(src="scripts/app.js")
//- Services
each service in ["xml2json","Auth","Search","Details","Pending","Records","UserStatus","Reply","Colors","Layers"]
script(src="scripts/services/#{service}.js")
//- Filters
each filter in ["error"]
@diestrin
diestrin / Preferences.sublime-settings
Last active December 20, 2015 07:29
Sublime Text Personal Configuration
{
"auto_indent": true,
"bold_folder_labels": false,
"caret_extra_width": 2,
"color_scheme": "Packages/Babel/Monokai Phoenix.tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
app = angular.module 'app', []
app.factory 'API', ($http) ->
@get = (url) ->
$http.get(url).then (data) ->
# check if the data is complete
data
@
// Generated on 2013-07-26 using generator-angular 0.3.1
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
#menu {
position: absolute;
top: 0;
bottom: 0;
right: 0;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
width: 30%;
transform: translate(0%, 0);
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('./DB.db');
db.serialize(function() {
db.each("SELECT * FROM sqlite_master WHERE type='table'", function(err, table) {
db.each("SELECT * FROM " + table.tbl_name, function(err, row) {
console.log("Table: " + table.tbl_name);
console.log(row);
});
});
waitFor: function (config) {
// Optional
var context = config.context || window,
interval = config.interval || 50,
timeOut = config.timeOut || 2000,
expire = config.expire || function(){};
// Required
var varName = config.varName,
callback = config.callback;
@diestrin
diestrin / Hexagon.scss
Created October 24, 2013 05:46
Hexagon mixin for sass. Use http://jtauber.github.io/articles/css-hexagon.html as a reference.
@mixin hex ($size, $color, $direction: vertical, $margin: true) {
$height: 0;
$width: 0;
@if $direction == vertical {
$width: $size;
$height: round($size * (30 / 52));
}
@else {
@diestrin
diestrin / rules.less
Last active December 31, 2015 04:09
// gente, reglas generales de escritura en los estilos, PORFA, siganlas
// ----
// entre selectores hermanos, una linea:
// bien:
.casa {
}
/*
Web client
This sketch connects to a website (http://www.google.com)
using a WiFi shield.
This example is written for a network using WPA encryption. For
WEP or WPA, change the Wifi.begin() call accordingly.
This example is written for a network using WPA encryption. For