Skip to content

Instantly share code, notes, and snippets.

View seigel's full-sized avatar

James Seigel seigel

View GitHub Profile
@seigel
seigel / application_helper.rb
Created October 1, 2018 19:21 — forked from exocode/application_helper.rb
Render with ``render_to_string`` a complete page within a sidekiq worker including current_user
module ApplicationHelper
def current_user
@current_user ||= warden.authenticate(:scope => :user)
end
end
@seigel
seigel / nodebot.js
Created October 25, 2018 21:08 — forked from Rup1/nodebot.js
Preliminary script. File-watching specific folder using Chokidar, and automating Apple Mail using JXA.
var osa = require('osa2');
var fs = require('fs');
var chokidar = require('chokidar');
var watcher = chokidar.watch('/Users/rup/Desktop/trolls', {
ignored: /(^|[\/\\])\../,
ignoreInitial: true,
persistent: true,
});
var brain = require('brain.js')
var fs = require('fs')
// configuration to be used in the brain
const config = {
binaryThresh: 0.5, // arbitary value
hiddenLayers: [3], // the size of the hidden layers in the network
activation: 'sigmoid' // activation function
}
@seigel
seigel / Brewfile
Created December 25, 2019 21:04 — forked from miry/Brewfile
MacOS Brewfile to install default applications. https://github.com/Homebrew/homebrew-bundle
cask_args appdir: "~/Applications"
tap "caskroom/cask"
cask 'sqleditor'
cask 'google-chrome'
cask 'homebrew/cask-versions/firefox-developer-edition'
# cask 'resilio-sync'
cask 'keybase'
# cask 'dashlane'
cask 'visual-studio-code'