Skip to content

Instantly share code, notes, and snippets.

View bayleedev's full-sized avatar
🍿

Baylee Schmeisser bayleedev

🍿
View GitHub Profile

VIM

Ctrl P New

  • Tab: ctrl+t
  • Vsplit: ctrl+v
  • HSplit: ctrl+x

Movements

<?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();
dotties install <package>
dotties uninstall <package>
dotties update
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
var foo = {
name: 'blaine',
bar: function() {
console.log(this) // { name: 'blaine' }
}
}
var bar = foo.bar // window
var baz = {
@bayleedev
bayleedev / extract.php
Created June 14, 2016 07:17
extract slack
<?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!
'use strict';
const Datastore = require('nedb')
class CappedCollection {
constructor (name, size) {
this.MAX_SIZE = size
this.collection = new Datastore({
filename: './' + name + '.nedb',
autoload: true,
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);
<!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 }
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.