Skip to content

Instantly share code, notes, and snippets.

Avatar

Charlie Hield stursby

  • Minneapolis, MN
View GitHub Profile
@stursby
stursby / test.js
Created July 30, 2019 16:42
Bottleneck example
View test.js
const axios = require('axios')
const Bottleneck = require('bottleneck')
const limiter = new Bottleneck({
maxConcurrent: 1,
minTime: 5000
})
const urls = [
'https://jsonplaceholder.typicode.com/users',
@stursby
stursby / README.md
Last active July 10, 2019 15:59
Craft 3.2 Headless Preview
View README.md
  1. This assumes you’ve got Craft 3.2 running and the CraftQL plugin installed 🙌🏻

  2. Create a Section named Home and then attach a field named Copy to your field layout.

  3. Add a Preview Taget (in the Home section settings) with the label Local pointing to the URL http://localhost:3000

image

  1. Go into the Home entry and click Preview button, then switch to Local target.
@stursby
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo
View README.md

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@stursby
stursby / fonts.css
Created July 12, 2016 14:24
System font stack
View fonts.css
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
@stursby
stursby / one-liner.md
Last active May 19, 2016 15:56
linux web permissions
View one-liner.md

Apache

sudo chown -R www-data:www-data /var/www/html/

nginx

sudo chown -R www-data:www-data /usr/share/nginx/html/
@stursby
stursby / tip.md
Last active May 12, 2016 15:07
Dynamic shebang
View tip.md
#!/usr/bin/env <language>

Example

#!/usr/bin/env python
@stursby
stursby / info.md
Last active December 22, 2015 20:09
Raspberry Pi boot SMS IP address script
View info.md

Raspberry Pi boot SMS IP address script

Set environment variables

Open .bashrc

sudo nano ~/.bashrc
@stursby
stursby / LOC.md
Created December 4, 2015 16:39
Count number LOC (line of code)
View LOC.md
find . -name "*.js" | xargs cat | wc -l

(via Slideshare).

@stursby
stursby / README.md
Last active September 23, 2015 14:54
Deploy Meteor to Heroku
View README.md

Create remote staging branch with custom name "my-app-name". This will become my-app-name.herokuapp.com

heroku create my-app-name --remote staging

Add the Meteor build pack Meteor Buildpack Horse

heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
@stursby
stursby / selectors.md
Created March 17, 2015 19:14
Weird selectors
View selectors.md
  • :-webkit-autofill remove autofill input yellow background Demo