Skip to content

Instantly share code, notes, and snippets.

Ryan Burnette ryanburnette

Block or report user

Report or block ryanburnette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View backup
#/usr/bin/env bash
export AWS_CONFIG_FILE="/home/user/.aws/config"
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXHRQ
export AWS_SECRET_ACCESS_KEY=XXXXXXXfHyR
/path/to/aws s3 sync /path/to/uploads/ s3://mybucket/uploads/
@ryanburnette
ryanburnette / node.service
Last active Jul 9, 2019
Notes on running NodeJs as a systemd service
View node.service
[Unit]
Description=service
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/opt/service
ExecStart=/bin/bash -c 'exec bin/node app.js 2>&1 >> logs/console.log'
Restart=always
@ryanburnette
ryanburnette / wp-set-password.sql
Last active Oct 13, 2018
Reset WordPress password with a MySQL query.
View wp-set-password.sql
UPDATE `wp_users` SET `user_pass`= MD5('password') WHERE `user_login`='ryan';
View gist:8eba6fcbab5ac8d5786641dcaf68a1cb
### Keybase proof
I hereby claim:
* I am ryanburnette on github.
* I am ryanburnette (https://keybase.io/ryanburnette) on keybase.
* I have a public key ASBqzMnCncvJ5ecO8r5sfXzYYsdVZkwgEsL0rgXDYvZQDgo
To claim this, I am signing this object:
@ryanburnette
ryanburnette / pop-buffer-colors.js
Last active Apr 11, 2018
pop the buffer colors on reserve grids on flica
View pop-buffer-colors.js
['red','green'].forEach(function (color) {
document.querySelectorAll('.buffer-color-'+color).forEach(function (el) {
el.setAttribute('style','background-color:'+color+'!important;color:white!important;')
})
})
@ryanburnette
ryanburnette / universal-definition-pattern.js
Last active Sep 13, 2018
A universal definition pattern for JavaScript libraries. Supports require(), AMD, and browser.
View universal-definition-pattern.js
;(function() {
function myModule() {
}
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = myModule;
}
else {
if (typeof define === 'function' && define.amd) {
define([], function() {
@ryanburnette
ryanburnette / create.js
Created Jan 9, 2018
Create an Object in Sails from the console
View create.js
[Model].create({[attributeKey]:[attributeValue]).exec(console.log)
View tmux-pairing
# create tmux session w/ a socket file
tmux -S /tmp/tmux-pairing new-session -s pairing
# open up permissions on the socket file
chmod 777 /tmp/tmux-pairing
# all users connect to tmux session using the socket
tmux -S /tmp/tmux-pairing attach-session -t pairing
View foo-bar.js
(function (exports) {
function foo() {
return 'foo';
}
function bar() {
return 'bar';
}
exports.foo = foo;
exports.bar = bar;
}(typeof module !== 'undefined' ? module.exports : window))
View what.js
function Foo() {
}
var f = new Foo();
You can’t perform that action at this time.