Skip to content

Instantly share code, notes, and snippets.

View rouanw's full-sized avatar

Rouan Wilsenach rouanw

View GitHub Profile
@rouanw
rouanw / ReactPlonk.jsx
Created February 5, 2020 13:53
React Plonk
// Use this where you want to see some object/state printed on screen
(whatever) => (<pre>{JSON.stringify(whatever, null, 2)}</pre>)
@rouanw
rouanw / textmarketer-spike.js
Created July 24, 2019 07:15
TextMarketer Spike code
const request = require('superagent');
var parser = require('fast-xml-parser');
var Json2xml = require("fast-xml-parser").j2xParser;
const json2xml = new Json2xml();
async function getCredits() {
const response = await request
.get('https://api.textmarketer.co.uk/services/rest/credits?username=x&password=x')
.buffer()
.type('xml')
@rouanw
rouanw / message-bird-api.js
Created July 23, 2019 08:54
Sending SMS with MessageBird client
/*
Annotated version of example from: https://developers.messagebird.com/api/sms-messaging#send-outbound-sms
*/
// There's a node SDK we can use: https://github.com/messagebird/messagebird-nodejs
var messagebird = require('messagebird')('API Key'); // API key from https://dashboard.messagebird.com/en/developers/access
messagebird.messages.create({
originator : '+441234567890', // Needs to be the one set up for the account
@rouanw
rouanw / remembear-csv-to-1password.js
Last active June 2, 2021 12:47
Transform Remembear CSV Export into a format 1Password can import
/*
Script to take a Remembear password export and turn it into a CSV 1Password will understand.
Tested with 1Password 7 and Remembear 1.4.2.
Note that Remembear makes a mess of the CSV export if you have any multi-line notes.
If you have any of these you'll need to clean those up in the exported CSV before running this script.
It's also not great at marking things in the trash so maybe clear your Remembear trash before exporting.
To run (assumes remembear_export.csv is in the same folder):
#!/bin/sh
adb pull /sdcard/DCIM/Camera .
@rouanw
rouanw / please.sh
Last active February 10, 2017 13:18
please
# Add this line to your ~/.bash_profile
alias please=": &&"
# Examples:
please npm install
please tail -f *.log
please docker help
# A more polite coding experience
@rouanw
rouanw / brewpack_getting_started.sh
Created November 25, 2016 07:44
Getting started with brewpack
# create a packages.yml file
# if you already use homebrew, brewpack will include your installed formulae
brewpack init
# install something new
brewpack install --save git
brewpack install --save --cask google-chrome
# joined a new team? get the stuff you need
brewpack install --repo example-company/funteam
@rouanw
rouanw / Adjacent.jsx
Last active October 28, 2016 09:37
React
const MyComponent = ({ name }) => (<div>
<h1>Some title</h1>
<div>Hello {name}</div>
</div>
);
// Somewhere else
<div>
<MyComponent name={firstName + Surname} />
@rouanw
rouanw / start_script_example.sh
Created February 8, 2016 07:48
Running dashing with Puma
#!/bin/sh
bundle exec rackup -s puma -p 3030
@rouanw
rouanw / README.md
Created December 20, 2015 05:53 — forked from gavinbunney/README.md

Bamboo Plan Dashing Widget

Dashing widget to display plan build details from your Bamboo instance.

Preview

Bamboo Dashing Widget

Installation