Skip to content

Instantly share code, notes, and snippets.

View robaxelsen's full-sized avatar

Rob Axelsen robaxelsen

View GitHub Profile
@robaxelsen
robaxelsen / NqyNYP.markdown
Last active August 29, 2015 14:24
Weather Card
@robaxelsen
robaxelsen / stringreplace.sh
Created March 19, 2016 19:28
Replacing string in multiple files in Linux
grep -rl stringyouwanttofind somedirectory/ | xargs sed -i 's/stringyouwanttofind/stringyouwanttoreplacewith/g'
@robaxelsen
robaxelsen / jsonexample.js
Created April 12, 2016 08:19
JSON example for blog post over at helloilovecode.com
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
NEW PRODUCT! RASPBERRY PI ZERO W JOINS THE FAMILY
https://www.raspberrypi.org/blog/raspberry-pi-zero-w-joins-family/
JerryScript, A JavaScript engine for Internet of Things :
http://jerryscript.net/
Cylon.js, JavaScript robotics framework:
https://cylonjs.com/
Johnny-Five, JavaScript Robotics & IoT Platform:
@robaxelsen
robaxelsen / gist:5dcf8432778ad6f05504a392d20927f3
Created June 1, 2017 11:54
Chrome 58, Chrome Dev Tools Console Methods For Filter Testing
console.assert(true, {assert: "assert"});
console.count('count');
console.debug('debug');
console.dir({dir: "dir"});
console.error('error');
console.info('info');
console.log('log');
console.profile('profile');
setTimeout(function(){ console.profileEnd('profile'); }, 1000);
console.table('table');
@robaxelsen
robaxelsen / websocketd-play
Created October 25, 2017 12:43
Some notes and code for using tail -f with websocketd
To send content of file via websocket:
`websocketd --port 1234 tail -f test.txt`
To update file when websocketd running you need append/redirect to it, not edit
the file with editor, because "tail -f" can't access protected memory.
`echo "new line" >> test.txt`
In browser, put this in console to receive the websocket stream:
`var ws = new WebSocket('ws://localhost:1234/');
@robaxelsen
robaxelsen / .Xresources
Created November 9, 2017 20:54
.Xresources with molokai color scheme
! Molokai theme
*xterm*background: #101010
*xterm*foreground: #d0d0d0
*xterm*cursorColor: #d0d0d0
*xterm*color0: #101010
*xterm*color1: #960050
*xterm*color2: #66aa11
*xterm*color3: #c47f2c
*xterm*color4: #30309b
*xterm*color5: #7e40a5
Verifying my Blockstack ID is secured with the address 16faQtghVzELq1K4ufyGhKcRXmyqMYEyaN https://explorer.blockstack.org/address/16faQtghVzELq1K4ufyGhKcRXmyqMYEyaN
apollo: {
cats: {
query: gql`
{
cats {
id
name
}
}
`
@robaxelsen
robaxelsen / KittyCards.vue
Last active February 21, 2019 14:40
File goes in src/components/KittyCards.vue
<template>
<v-container grid-list-md>
<v-layout
text-xs-center
wrap
>
<v-flex
v-for="cat in cats"
:key="cat.id"
xs12