Key(s) | Command(s) |
---|---|
h, j, k, l | left, up, down, right |
0, ^, $ | beginning, first character, end of line |
f, F | go to next occurrence of character on current line |
gg, G, : | go to first line, last line, line number |
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
mkdir -p ~/tmp/devices | |
cd ~/tmp/devices | |
npm init -y | |
npm install meshblu-blink1 | |
cd meshblu-blink1 | |
echo '{ | |
"uuid": "370b01b5-1927-44a1-a30b-2147430a4fae", | |
"token": "561bbf70d2aa2db62d22d8f85c19155c52184995", | |
"server": "meshblu.octoblu.com", | |
"port": 443 |
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
node_modules/.bin/browserify -t coffeeify --extension=".coffee" -s GatebluWebsocket index.coffee > public/gateblu-websocket.js && hs -p 3444 |
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
$('.user-actions-follow-button').filter(function(){ return $(this).find('.follow-text:visible').size(); }).sort(function() { | |
return .5 - Math.random(); | |
}).slice(0, 1000).click(); |
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
{ | |
"passfail": false, // Stop on first error | |
"maxerr": 100, // Maximum error before stopping | |
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment. | |
"browser": true, // Standard browser globals e.g. `window`, `document`. | |
"esnext": true, // Allow ES.next specific features such as `const` and `let`. | |
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.). | |
"camelcase": false, // Permit only camelcase for `var` and `object indexes`. | |
"curly": false, // Require {} for every new block or scope. | |
"eqeqeq": true, // Require triple equals i.e. `===`. |
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 | |
function duplicate_bean($bean){ | |
$exclude = array( | |
'id', | |
'date_entered', | |
'date_modified' | |
); | |
$newbean = new $bean->object_name; | |
foreach($bean->field_defs as $def){ |
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 | |
class CustomAPI { | |
var $inbound = false; | |
public function __construct(){ | |
$this->inbound = $this->parse_inbound_json(); | |
} | |
public function get_inbound(){ return $this->inbound; } |
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 | |
if(!defined('sugarEntry'))define('sugarEntry', true); | |
chdir(realpath(dirname(__FILE__))); | |
require_once('include/entryPoint.php'); | |
//Running with SugarCRM | |
//Custom Code Goes below here |
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 | |
function send_report_email($subject, $body, $emails){ | |
require_once('include/SugarPHPMailer.php'); | |
$emailObj = new Email(); | |
$defaults = $emailObj->getSystemDefaultEmail(); | |
$mail = new SugarPHPMailer(); | |
$mail->setMailerForSystem(); |
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 | |
global $timedate; | |
$timedate->swap_formats(date('Y-m-d'), $timedate->dbDayFormat, $timedate->get_date_format()); |