Skip to content

Instantly share code, notes, and snippets.

View imCoding's full-sized avatar
👋

Adrian Coria imCoding

👋
  • Sony Entertainment Network
  • USA ↔ Argentina
View GitHub Profile
Verifying that "adriancoria.id" is my Blockstack ID. https://onename.com/adriancoria
@imCoding
imCoding / Git push deployment in 7 easy steps.md
Created May 18, 2017 20:09 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
<?php
// Define a 32-byte (64 character) hexadecimal encryption key
// Note: The same encryption key used to encrypt the data must be used to decrypt the data
define('ENCRYPTION_KEY', 'd0a7e7997b6d5fcd55f4b5c32611b87cd923e88837b63bf2941ef819dc8ca282');
// Encrypt Function
function mc_encrypt($encrypt, $key){
$encrypt = serialize($encrypt);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
$key = pack('H*', $key);
//UI for valiation
function validationMessages() {
//*** 'me' acts as an alias that can be used within the methods
var me = this;
var imgPath=Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,"images/bubble.png");
validationMessages.totalErrors =0;
validationMessages.reqdfieldsRemaining=0;
web: node server
@imCoding
imCoding / app.js
Created January 20, 2014 14:57 — forked from zeuxisoo/app.js
Ti.include('lib/htmlparser.js');
Ti.include('lib/soupselect.js');
var select = soupselect.select;
var body = '<html><head><title>Test</title></head>'
+ '<body>'
+ '<img src="http://l.yimg.com/mq/i/home/HKGallery.gif" />'
+ '<div id="block">'
+ ' <div class="row">Row 1</div>'
var win = Titanium.UI.currentWindow;
var messageView = Titanium.UI.createView({
height:30,
width:250,
visible:false
});
var indView = Titanium.UI.createView({
height:30,
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@imCoding
imCoding / gist:1550580
Created January 2, 2012 12:54
IP SCAN - Linux Terminal.
for IP in 192.168.1.{100..120};
do if ping $IP -c 1 > /dev/null;
then echo $IP TAKEN;
else echo $IP FREE;
fi;done