Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeffrey Warren jywarren

View GitHub Profile
View mapknitter-users.txt
https://mapknitter.org/profile/007sonic
https://mapknitter.org/profile/025091
https://mapknitter.org/profile/100kristine
https://mapknitter.org/profile/101dmart
https://mapknitter.org/profile/1260730865
https://mapknitter.org/profile/1800injured
https://mapknitter.org/profile/21karrottapioca
https://mapknitter.org/profile/2903
https://mapknitter.org/profile/2peanut1
https://mapknitter.org/profile/3136114
View all-map-names.txt
https://mapknitter.org/maps/--10
https://mapknitter.org/maps/--12
https://mapknitter.org/maps/--13
https://mapknitter.org/maps/--14
https://mapknitter.org/maps/--15
https://mapknitter.org/maps/--17
https://mapknitter.org/maps/--19
https://mapknitter.org/maps/--21
https://mapknitter.org/maps/--22
https://mapknitter.org/maps/--23
View mapknitter-maps-2-stable.txt
https://mapknitter.org/maps/rimac
https://mapknitter.org/maps/mit
https://mapknitter.org/maps/mit-night
https://mapknitter.org/maps/google-campus
https://mapknitter.org/maps/duinen
https://mapknitter.org/maps/cantagallo
https://mapknitter.org/maps/deathstar-plans
https://mapknitter.org/maps/bcds
https://mapknitter.org/maps/santa-marta
https://mapknitter.org/maps/sdjf
View maplist.rb
output = File.open('public/maps2.txt',"w")
output << Map.joins(:warpables).where(password: '').distinct.col
lect(&:slug).join(',')
output.close
View flash-bot.gltf
{"textures":[{"source":0,"sampler":0},{"source":1,"sampler":0},{"source":2,"sampler":0}],"skins":[{"name":"AvatarRoot","joints":[40,39,6,5,2,3,4,22,9,8,7,12,11,10,15,14,13,18,17,16,21,20,19,38,25,24,23,28,27,26,31,30,29,34,33,32,37,36,35],"inverseBindMatrices":11}],"scenes":[{"nodes":[1,47],"name":"Scene"}],"scene":0,"samplers":[{"minFilter":9987,"magFilter":9729}],"nodes":[{"rotation":[-0.7071067690849304,0,0,0.7071067690849304],"name":"Light_Orientation.001_Orientation","extensions":{"KHR_lights_punctual":{"light":0}}},{"name":"Light_Orientation.001","children":[0]},{"translation":[-0.06142770126461983,0.05949225276708603,0.13090287148952484],"scale":[1,0.9999998211860657,0.9999999403953552],"rotation":[5.396385915901192e-8,0.6993563771247864,0.7147731184959412,5.279993331441801e-8],"name":"RightEye","isBone":true},{"translation":[0.06142747774720192,0.059492480009794235,0.13090330362319946],"scale":[1,0.9999998211860657,0.9999999403953552],"rotation":[5.396385915901192e-8,0.6993563771247864,0.7147731184959
View modal-pl.js
<!-- insert this code into a PL wiki page to create a modal popup -->
<link rel="stylesheet" href="https://idurar.github.io/vanilla-js-modal/src/modal.css" />
<script src="https://idurar.github.io/vanilla-js-modal/src/modal.js"></script>
<div id="idContent" style="display:none">
<h3>Asking for your help</h3>
<p>Are you a teacher in New Orleans?</p>
<div class="container"><div class="row">
<div class="col-6">
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 https://github.com/publiclab/plots2/issues/3120
shell: /bin/bash -e {0}
env:
RAILS_ENV: test
@jywarren
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;
}