Skip to content

Instantly share code, notes, and snippets.

@chao-xian
chao-xian / ministers.js
Created October 11, 2021 18:40
Xuntos copy paste
orgs = await fetch("https://www.gov.uk/api/content/government/organisations").then(response => response.json())
ministers = await fetch("https://www.gov.uk/api/content/government/ministers").then(results => results.json())
console.log(`${ministers["links"]["ministers"][12]["links"]["role_appointments"][0]["title"]} - ${orgs["details"]["ordered_ministerial_departments"][5]["title"]}`)
@chao-xian
chao-xian / veg-mapoh-tofu.md
Created July 4, 2021 11:30
Veg ma poh tofu

Vegan ma poh tofu recipe

Ingredients

@chao-xian
chao-xian / games-consoles.txt
Last active January 8, 2018 18:45
For Sale
XBOX 360, PS3 and PS2 videogame consoles for sale
XBOX 360 Elite 120GB console £50
1 x controller
Wireless (A/B/G) adaptor
HDMI cable
Voice headset (never used)
Power adaptor
Manual
@chao-xian
chao-xian / xbox360.txt
Created October 30, 2016 13:17
XBOX 360 Elite 120GB with Batman Arkham Trilogy, Gears of War 1 and 2, MGS Collection, TF Fall of Cybertron
XBOX 360 Elite 120GB
1 x controller
Wireless (A/B/G) adaptor
HDMI cable
Voice headset (never used)
Power adaptor
Manual
Batman Arkham Asylum
Batman Arkham City (lenticular 3D slip cover)
@chao-xian
chao-xian / brew-instructions.sh
Created October 3, 2016 21:09 — forked from petemcw/brew-instructions.sh
Setup dnsmasq on Mac OS X
# Install `dnsmasq` and configure for *.dev domains
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Reload configuration and clear cache
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ dscacheutil -flushcache
@chao-xian
chao-xian / Guard gems
Last active September 23, 2016 11:14
Running tests in different ways
# For adding guard and guard notification
group :development do
gem 'guard'
gem 'guard-minitest'
gem 'terminal-notifier-guard'
gem 'guard-livereload', '~> 2.5', require: false
end
  • Lovely interface
  • Editing settings is much easier
  • As is installing packages
  • Startup is slow
  • Searching packages is slow
  • No built in build option?
  • But there's a ruby-test plugin already! https://atom.io/packages/ruby-test
  • I like the sync-settings plugin
  • atom-linter and linter-rubocop is much prettier and just worked with RVM
  • putting in a long text string really slows it down though :(
@chao-xian
chao-xian / SassMeister-input.scss
Created September 1, 2014 13:33
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
$color: blue;
$tablet: 768px;
@mixin border-radius($radii) {
border-radius: $radii;
}
@chao-xian
chao-xian / SassMeister-input.scss
Created September 1, 2014 11:28
Generated by SassMeister.com.
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
// Create a %placeholder with repeated CSS and @extend them as required.
%btn {
border: 1px solid;
margin: 10px 0px;