Skip to content

Instantly share code, notes, and snippets.


Jeffrey Warren jywarren

View GitHub Profile
View 70-persistent-net.rules
# /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="ieee80211", ACTION=="add|change", ATTR{macaddress}=="b8:27:eb:ff:ff:ff", KERNEL=="phy0", \
RUN+="/sbin/iw phy phy0 interface add ap0 type __ap", \
RUN+="/bin/ip link set ap0 address b8:27:eb:ff:ff:ff"
jywarren /
Last active Apr 13, 2021
My current "saved replies" on GitHub -- for first-timers-only engagement

GitHub lets you save boilerplate comment replies -- not because we need to be robots, but because sometimes it's hard to be extra kind when you're darting back and forth through lots of issues, and briefly checking in on people throughout the day!

You can add these to your account here:

I license these CC-Zero and release them Public Domain, and if you have others to add to this list, please fork and ping me!

Also note that the titles below are just what show in your menu - they're not actually part of the reply.

Are you stuck?

View core-tests.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/gitpod/.nvm/versions/node/v12.18.2/bin/node',
1 verbose cli '/home/gitpod/.nvm/versions/node/v12.18.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'core-tests'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v12.18.2
4 verbose run-script [ 'precore-tests', 'core-tests', 'postcore-tests' ]
View gist:c6dc4d92ada5da0af6bfe8e960116d92
gitpod /workspace/plots2 $ rails test test
DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
boolean values and must have old data converted to 1 and 0 (its native boolean
serialization) before setting this flag to true. Conversion can be accomplished
by setting up a rake task which runs
ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)
View sassc-error.log
cp config/database.yml.example config/database.yml
cp db/schema.rb.example db/schema.rb
sudo systemctl start mysql
mysql -uroot -proot -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''));"
mysql -uroot -proot -e "CREATE DATABASE plots;"
bundle exec rake db:schema:load db:migrate --trace
# above SET @@global.sql_mode is to address issue in
shell: /bin/bash -e {0}
View nano-data-logger-plantower.ino
/* For a Nano Data Logger logging data from a Plantower 5003 particle sensor
@file NanoVOC7330v1.0.ino
Plantower 5003 code based on
Does not use a library for the Plantower 7003
C. Fastie 11/2018
Jeffrey Yoo Warren 09/2019
#include <SdFat.h> //
#include <SPI.h>
jywarren / index.js
Last active Nov 13, 2020
Template for simple JS library
View index.js
module.exports = myLibrary = function constructor(o) {
let privateMethod = require('./privateMethod.js')({}); // we can pass in an object full of options
let publicMethod = o.publicMethod || require('./publicMethod.js'); // allow methods to be overridden via options object
let publicApi = {
element: el, // the HTML element into which the library is inserted, if any
publicMethod: o.publicMethod, // here we expose any public methods we want
options: o // options can be exposed too
return publicApi;
View large-stage.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:d1ab70c6fc17b7a752810b9a84b97541
Started POST "/images" for at 2020-08-18 15:36:13 +0000
Processing by ImagesController#create as JSON
Parameters: {"authenticity_token"=>"wuflt1Wepizvywwhw+5crTD56SGhl0P4ZAt8IiBfrYv7zfGBMeDgq7xwIMhL9TWt+GW92Asz6rNO+rDuxDXroA==", "uid"=>"1", "image"=>{"photo"=>#<ActionDispatch::Http::UploadedFile:0x00007faa1096a020 @tempfile=#<Tempfile:/tmp/RackMultipart20200818-258-50admo.png>, @original_filename="muk.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"image[photo]\"; filename=\"muk.png\"\r\nContent-Type: image/png\r\n">}}
[paperclip] Trying to link /tmp/RackMultipart20200818-258-50admo.png to /tmp/b60fb7657926287713da4f2861d6db3520200818-258-x45r2h.png
[paperclip] Trying to link /tmp/b60fb7657926287713da4f2861d6db3520200818-258-x45r2h.png to /tmp/b60fb7657926287713da4f2861d6db3520200818-258-1fv4zqi.png
Command :: file -b --mime '/tmp/b60fb7657926287713da4f2861d6db3520200818-258-1fv4zqi.png'
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/b60fb765792
jywarren / pixelate.js
Last active Aug 10, 2020
A bookmarklet to make all pixel art crisp. Save as a bookmark URL and use the bookmark on any page to prevent anti-aliasing.
View pixelate.js