https://www.nintendo.com.hk/data/json/switch_software.json
https://www.nintendo.co.jp/data/software/xml/switch.xml
# I submitted a bug report https://github.com/rails/rails/issues/34244 | |
# b/c Rails was not honouring my `rescue_from` block which was causing my API to | |
# be inconsistent. I was told this is expected behaviour. I think it's probably | |
# fine for an HTML app where you control the form inputs. But for an API app, | |
# the API is public facing and very important, so Rails shouldn't have its own | |
# special errors that bypass my app's configuration and make my API inconsistent. | |
# | |
# Decided it shouldn't be too difficult to handle this myself. So, here is my | |
# solution. It contains most of the important lessons I've learned about how to | |
# get a Rails API app setup. It removes Rails' params parsing and adds its own. |
rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.
{ | |
"theme": "light", | |
"autoUpdate": false, | |
"snippet": { | |
"expanded": true, | |
"newSnippetPrivate": false, | |
"sorting": "updated_at", | |
"sortingReverse": true | |
}, | |
"editor" : { |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
You don't have to delete your local branch.
Simply delete your remote tracking branch:
git branch -d -r origin/<remote branch name>
(This will not delete the branch on the remote repo!)
See "Having a hard time understanding git-fetch"
there's no such concept of local tracking branches, only remote tracking branches.
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |