- Tab: ctrl+t
- Vsplit: ctrl+v
- HSplit: ctrl+x
This file contains 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('workflows.php'); | |
include_once('sqlite.php'); | |
define('HISTORY_DB', 'chrome_history.db'); | |
define('UID', 'com.schmalfeldt.ChromeHistory'); | |
$workflow = new Workflows; | |
$db = new HistoryDB(); |
This file contains 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
dotties install <package> | |
dotties uninstall <package> | |
dotties update |
This file contains 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 'newrelic_rpm' | |
include NewRelic::Agent::Instrumentation::ControllerInstrumentation | |
def run | |
perform_action_with_newrelic_trace(name: "etl_provider", category: :task) do | |
run_task! | |
end | |
end |
This file contains 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 foo = { | |
name: 'blaine', | |
bar: function() { | |
console.log(this) // { name: 'blaine' } | |
} | |
} | |
var bar = foo.bar // window | |
var baz = { |
This file contains 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 isDirectory($file, $items) { | |
if (strpos($file, '.') !== false) { | |
return false; // nothing with a dot is a directory | |
} | |
$regex = "/^" . preg_quote($file, '/') . "\//"; | |
foreach ($items as $item) { | |
if (!!preg_match($regex, $item)) { | |
return true; // it found things inside! |
This file contains 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
'use strict'; | |
const Datastore = require('nedb') | |
class CappedCollection { | |
constructor (name, size) { | |
this.MAX_SIZE = size | |
this.collection = new Datastore({ | |
filename: './' + name + '.nedb', | |
autoload: true, |
This file contains 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 val = 5184; | |
var set = [7921, 5184, 8836, 4761] | |
var average = set.reduce((memo, num) => { | |
return memo + num; | |
}, 0) / set.length; | |
var max = Math.max.apply(this, set); | |
var min = Math.min.apply(this, set); |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Electron Boilerplate</title> | |
<script src="helpers/context_menu.js"></script> | |
<script src="helpers/external_links.js"></script> | |
<style> | |
body { margin: 0 } |
This file contains 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
Atom team Houses Electron | |
What is it? | |
Atom is githubs open source text editor. The dream with atom was to build it | |
with web technology, but no tools existed. Chang (node web kit). January 2013 | |
Electron began. OS'd May 2014. April 2015 it was split out. | |
Framework to build cross platform desktop applications with web technology. | |
Chromium is the OS Chrome Browser. |