Skip to content

Instantly share code, notes, and snippets.

View fenwick67's full-sized avatar
🔩
improving entry plug mechanism

Drew Harwell fenwick67

🔩
improving entry plug mechanism
View GitHub Profile
@fenwick67
fenwick67 / correct-emojis.js
Last active August 9, 2021 15:01
get rid of github's emoji shortcodes and replace with real unicode emojis.
/*
Change emojis from github style :emoji: syntax to actual code points
Example usage:
var md = `fix race condition :heavy_check_mark: :battery: :horse:`
var fixed = correctEmojis(md);
*/
@fenwick67
fenwick67 / thonline.js
Created January 29, 2018 16:21
restyle the telegraph herald to let me read it
var ps = document.querySelectorAll('.asset-content p');
for (var i = 0; i < ps.length; i ++){
console.log(ps[i].innerHTML);
ps[i].style="display:block";
}
document.getElementById('syncronex-cover').style="display:none";
@fenwick67
fenwick67 / generate.js
Last active April 8, 2017 02:09
mastodon custom styles
//options
var expandCWs = true;
var fitPage = true;
var s = `@font-face{font-family:'Roboto';src:url(/assets/roboto/roboto-italic-webfont-23d8842c05a988e39557fdf836bd081d270ea95e58808963ccbcccec0cf2aaa0.eot);src:url(/assets/roboto/roboto-italic-webfont-23d8842c05a988e39557fdf836bd081d270ea95e58808963ccbcccec0cf2aaa0.eot?#iefix) format("embedded-opentype"),url(/assets/roboto/roboto-italic-webfont-cef353730c2e9aaf4c702cee3af0170b116fb050e2add4034e4e58bae3a77bd6.woff2) format("woff2"),url(/assets/roboto/roboto-italic-webfont-4afcc0e4cf460008ac71e7be52c5e5a58f100ed0811265965a210b34645d4f41.woff) format("woff"),url(/assets/roboto/roboto-italic-webfont-062b8a8cc29ac4aafa8dd14b1fddc2133751c553d8234d54ef6621b9aa4c0206.ttf) format("truetype"),url(/assets/roboto/roboto-italic-webfont-547054e5e02c8e908c008fd147fb97621e6d8e831502903491d48baf27b0c685.svg#roboto-italic-webfont) format("svg");font-weight:normal;font-style:italic}@font-face{font-family:'Roboto';src:url(/assets/roboto/roboto-bold-webfont-5c4d149837473ced5960
@fenwick67
fenwick67 / mix.js
Created April 7, 2017 20:10
JS reimplementation of OpenGL Mix - WTFPL
/* js implementatino of openGl's mix function: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/mix.xhtml
copyright you, released under WTFPL license http://www.wtfpl.net/about/ */
(function(){
function mixable(v){
var t = typeof v;
return t!='string' && t!='undefined';
}
@fenwick67
fenwick67 / uniquenames.txt
Created March 28, 2017 13:16
stanford baby names cs.stanford.edu/people/karpathy/namesGenUnique.txt http://boingboing.net/2016/05/06/baby-names-generated-by-a-neur.html
jka
Dillie
Ryine
Cherita
Dasher
Chailine
Frennide
Gremaley
Patj
Handi
@fenwick67
fenwick67 / onboot.md
Last active June 12, 2017 11:59
Start on Boot options

options for starting a service on boot in Linux (easy to hard):

rc.local

easy!

Just put your commands in rc.local and they will run ONCE on boot.

This file needs to be executable, and it also needs to exit.

MONGODB ON C9.io

sudo apt-get install -y mongodb-org

mkdir data
echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest "$@"' > mongod
chmod a+x mongod

#Mounting SMB shares from Netgear Readyshare

Netgear routers sometimes come with a feature called "Readyshare" which allows you to access files from the local network.

Let's mount it in linux, shall we?

##on boot Add the following line to /etc/fstab/ to mount on boot:

//192.168.1.1/USB_Storage /media/public cifs guest,user,sec=ntlm,username=hello 0 0