Skip to content

Instantly share code, notes, and snippets.

View jamlfy's full-sized avatar
🏡
Working from home

Jamlfy jamlfy

🏡
Working from home
  • Colombia
  • 04:22 (UTC -05:00)
View GitHub Profile
@jamlfy
jamlfy / prebuild.js
Last active August 29, 2015 14:20
Creator in i18n for NativeLang
#!/bin/env node
const fs = require('fs');
const path = require('path');
const childProcess = require('child_process');
const async = require('async');
const RUNTIME = {
android : function (dir, values, call) {
var master = [];
const entra = "10+62*7*+";
function flaten (input, carch) {
var a = 0, output = [];
if(!carch)
return input;
var last = input[ input.length - 1 ];
var past = input[ input.length - 2 ];
@jamlfy
jamlfy / get_num.js
Created May 5, 2015 21:52
No doy descripcion
const um =/(^|\s)(3([0-9]|\-){9,10})($|\s)/gim;
const search = 'lo que buscamos basico';
const _ = require('underscore');
var Twitter = require('twitter');
var client = new Twitter({
consumer_key: ,
consumer_secret: ,
@jamlfy
jamlfy / package.json
Created April 28, 2015 02:20
Auto Clean NPM
{
"name": "OpenShift-Sample-App",
"version": "1.0.0",
"description": "OpenShift Sample Application",
"author": {
"name": "alejonext",
"email": "[email protected]",
"url": "http://www.alejonext.co/"
},
"repository": {
@jamlfy
jamlfy / README.markdown
Created April 22, 2015 22:27
Change the version auto

Copian el archivo pre-push.js a repo/.git/hooks/pre-push. Y cada ves que le dan push le cambia la versión del patch

@jamlfy
jamlfy / vibrator.java
Last active August 29, 2015 14:16
Plugins basics in nativescript
package org.nativescript.vibration;
import android.content.Context;
import android.os.Vibrator;
/**
* This class provides access to vibration on the device.
*/
public class Vibration {
// Tu modelo... bla... bla..
module.exports = {
attributes: {
// Los Atributos....
},
damePlantas: function (){
try {
var pl = JSON.parse(this.plantas);
return pl;
function fal (input) {
var output = [], value;
for (var i = input.length - 1; i >= 0; i--) {
if (Array.isArray(input[i]) && input[i].length > 0) {
value = fal(input[i]);
for (var f = 0; f < value.length; f++)
output.push(value[f]);
} else if( !Array.isArray(input[i]) ){
output.push(input[i]);
}
@jamlfy
jamlfy / test.js
Last active August 29, 2015 14:12
Email (Gmail)
To: "[email protected]" <[email protected]>
Subject: prueba
X-PHP-Originating-Script: 0:class.phpmailer.php
Date: Tue, 30 Dec 2014 19:43:59 -0500
From: Alejandro Next <[email protected]>
Reply-To: Alejandro Next <[email protected]>
Message-ID: <[email protected]>
X-Priority: 3
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8