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
brew install mkcert | |
function ssl-check() { | |
f=~/.localhost_ssl; | |
ssl_crt=$f/server.crt | |
ssl_key=$f/server.key | |
b=$(tput bold) | |
c=$(tput sgr0) | |
# local_ip=$(ip route get 8.8.4.4 | head -1 | awk '{print $7}') # Linux Version |
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
// ----------------------------------------------------------------------------- | |
// Vue: Forage Adapter | |
// | |
// @example | |
// | |
// import VueForage from "services/vueforage" | |
// | |
// Vue.use(VueForage) | |
// | |
// this.$vueForage.creageInstance({ |
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
#!/usr/bin/env bash | |
uninstall() { | |
list=`gem list --no-versions` | |
for gem in $list; do | |
gem uninstall $gem -aIx | |
done | |
gem list | |
gem install bundler | |
} |
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
//---------------------------------- | |
// myDevices Cloud API sample code | |
//---------------------------------- | |
// Use rather request than https | |
const Http = require('https'); | |
const Util = require('util'); | |
const API_HOST = 'va-staging-corridor.mydevices.com'; | |
const API_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
cd /Users/<user>/.rbenv/versions/<version>/gemsets/<project>/gems/ | |
grep -ir <search string> * |
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
# Borrowed from https://github.com/y310/rspec-retry/blob/master/lib/rspec/retry.rb | |
# Drop this script into spec/support | |
# To test snippet just set timeout to 1 | |
RSpec.configure do |config| | |
Capybara.javascript_driver = :poltergeist | |
Capybara.register_driver(:poltergeist) do |app| | |
Capybara::Poltergeist::Driver.new app, |
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
date -n +%Y%m%d%H%M%S |
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
class HardWorker | |
include Sidekiq::Worker | |
include Sidetiq::Schedulable | |
recurrence { hourly } | |
def perform | |
# Do some work | |
end | |
end |
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
module YourGem | |
# Returns the version of the currently loaded YourGem as a <tt>Gem::Version</tt> | |
def self.version | |
Gem::Version.new VERSION::STRING | |
end | |
module VERSION | |
MAJOR = 1 | |
MINOR = 1 |
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
#!/bin/sh | |
# if cronjob junk .local mailbox | |
delete 1-10 | |
q |
NewerOlder