Skip to content

Instantly share code, notes, and snippets.

View ErikBoesen's full-sized avatar

Erik Kieran Boesen ErikBoesen

View GitHub Profile
@developerfromjokela
developerfromjokela / doc.txt
Last active August 20, 2023 17:30
JAMIX Menu REST API
API for finding "Kitchens":
https://fi.jamix.cloud/apps/menuservice/rest/haku/public
API for reading the table:
http://fi.jamix.cloud/apps/menuservice/rest/haku/menu/<customerID>/<kitchenID>?lang=fi
GET Params:
lang, language (fi, or en). Default = en.
type, json or table. Default = json.
@j-medland
j-medland / Server Side SVG Rendering with D3.js 4.x and jsdom.md
Last active August 10, 2023 02:39
Server Side SVG Rendering with D3.js 4.x and jsdom

Server Side SVG Rendering with D3.js 4.x and jsdom

This gist is mostly based on Tom Pearson's Block but with a slightly clearer use of d3 with the window object provided by jsdom's 'done' function. This example works as expected but perhaps there are some subtleties that I have missed in Tom's approach.

Other examples of using D3 and jsdom can be found in the tests straight from the D3 github

To use this example, open a command-prompt/terminal and

cd /directory/containing/package.json
npm install
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@tomgp
tomgp / package.json
Last active February 16, 2024 22:08
Server side SVG via D3 & jsdom
{
"name": "simple-node-d3",
"version": "1.0.0",
"description": "Serverside SVG via D3 & jsdom",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "tom.g.pearson@gmail.com",
"license": "ISC",
@rxaviers
rxaviers / gist:7360908
Last active May 5, 2024 15:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jaytaylor
jaytaylor / timeout.sh
Created September 11, 2013 18:18
Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements.
#
# Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements.
#
# Originally found on SO: http://stackoverflow.com/questions/601543/command-line-command-to-auto-kill-a-command-after-a-certain-amount-of-time
#
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
## Example usage:
#
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh