This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. `travis encrypt $(heroku auth:token) --add deploy.api_key` | |
2. inside `deploy:` add `provider:heroku` before `api_key: ...` | |
3. inside `deploy:` after `api_key` add `app: <name_of_the_heroku_app>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Client = { | |
socket: io(), | |
zombieManager: false, | |
newPlayer: function(){ | |
this.socket.emit('newplayer'); | |
}, | |
playerMove: function(x, y){ | |
this.socket.emit('move', {x, y}); | |
}, | |
shootBeam: function(x, y, angle, velocity){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
STAT=`parse_git_dirty` | |
echo "[${BRANCH}${STAT}]" | |
else | |
echo "" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var prompt = require('prompt'); | |
var fs = require('fs'); | |
var request = require('request'); | |
fs.readFile('package.json','utf8', function(err, data){ | |
var package=JSON.parse(data); | |
prompt.start(); | |
prompt.get(['username'], function(err, result){ | |
var username = result['username'] || process.env.USER || process.env.USER_PROFILE, | |
version = package.version; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'nokogiri' | |
gem 'sinatra' | |
gem 'headless' | |
gem 'watir' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('core.php'); | |
include_once('PDOResult.php'); | |
class PDODB{ | |
private $DBH; | |
protected $table; | |
protected function __construct(){ | |
try{ | |
$this->DBH = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME, DB_USR, DB_PWD); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash'); | |
var data = {}; | |
var casper = require('casper').create({ | |
viewportSize: { | |
width: 800, | |
height: 600 | |
}, | |
clientScripts: [ | |
'include/jquery-1.11.3.min.js', | |
'include/lodash.min.js' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************* | |
* | |
* @amount => Cantidad prestada neta(No se restan cargos ni se suman intereses) | |
* @charge => Cargos por apertura | |
* @byPeriod => Pago periódico | |
* @totalPayments => Total de pagos(Años, Meses, Quincenas, Días) | |
* @periodsByYear => Periodos por año de acuerdo a Banxico(Días: 360, Semanas: 52, Quincenas: 24, Meses: 12, Trimestres: 4) | |
* | |
*************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'win32ole' | |
outlook = WIN32OLE.new('Outlook.Application') | |
message = outlook.CreateItem(0) | |
message.Subject = 'Hola Mundo' | |
message.Body = 'Mail de prueba' | |
message.BCC = '' #Con copia para | |
message.SentOnBehalfOfName = '' #Mandar el correo a nombre de otro | |
message.To = '[email protected]' #Mail de quien recibirá el mensaje | |
#message.Attachments.Add('path/to/file') #En caso de querer adjuntar un archivo |
NewerOlder