Skip to content

Instantly share code, notes, and snippets.

View skplunkerin's full-sized avatar
🐰
Working W02K1N6 01110111 01101111 01110010 01101011 01101001 01101110 01100111

Skplunkerin skplunkerin

🐰
Working W02K1N6 01110111 01101111 01110010 01101011 01101001 01101110 01100111
View GitHub Profile
@skplunkerin
skplunkerin / UnmarshalJSON.md
Last active August 3, 2020 14:24
go golang custom unmarshal json string time

Strings in JSON Unmarshal

Quick note on this. JSON will add extra wrapping " quotes to strings which can really mess with you.

How to catch and remove the extra wrapping "'s:

example playground code

// UnmarshalJSON scrubs out whitespace from a valid json string, if any.
@skplunkerin
skplunkerin / gsheets.md
Last active May 26, 2021 17:05
google sheets gsheets spreadsheets tips
@skplunkerin
skplunkerin / test.md
Created July 30, 2019 14:33
rails test specific file line

For rails 5:

source

Specific test file:

rails test test/models/my_model.rb

Specific test in file:

@skplunkerin
skplunkerin / README.md
Created April 17, 2019 16:35
rails new create rails api
rails new my_project_name --api
@skplunkerin
skplunkerin / readme.md
Last active March 27, 2019 15:44
terminal / bash curl -I redirect check ping

Check to see if redirect is from cached browser, or server.

$ curl -I google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Thu, 13 Dec 2018 20:55:25 GMT
Expires: Sat, 12 Jan 2019 20:55:25 GMT
Cache-Control: public, max-age=2592000
@skplunkerin
skplunkerin / vmware-gparted.md
Last active November 8, 2017 17:46
vmware gparted increase disk space
@skplunkerin
skplunkerin / readme.md
Last active November 4, 2017 16:33
EC2 server psql postgres postgresql external IP access
@skplunkerin
skplunkerin / ssh-broken-pipe.md
Last active December 16, 2021 02:08
ssh broken pipe fix
@skplunkerin
skplunkerin / rails-fix.md
Last active December 20, 2016 18:21
X-Frame-Options to SAMEORIGIN

In application_controller.rb

before_filter :allow_iframe_requests

def allow_iframe_requests
  # allows iframe testing in development
  # http://stackoverflow.com/a/17862331/1180523
  response.headers.delete('X-Frame-Options')
end
@skplunkerin
skplunkerin / scribbles.md
Created August 26, 2016 01:11
ruby on rails local environment recipe
# Install Git and Ruby
$ sudo apt-get install git ruby

# Install Node v5 (or higher)
(https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)

$ curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
$ sudo apt-get install -y nodejs build-essential