Skip to content

Instantly share code, notes, and snippets.

View Olliepop's full-sized avatar
💁‍♂️

Oliver Shaw Olliepop

💁‍♂️
View GitHub Profile
@rcugut
rcugut / node-npm-install.md
Last active February 2, 2024 11:51 — forked from DanHerbert/fix-homebrew-npm.md
Install node & npm on Mac OS X with Homebrew

DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

@Tom-Alexander
Tom-Alexander / silverstripe_3_2_upgrade.sh
Created November 17, 2015 20:12
Upgrade script for silverstripe 3.2
cd $1
if ! hash jq 2>/dev/null; then
brew install jq
fi
composer install
jq '.require."silverstripe/cms" = "~3.2.0"' composer.json > tmp.$$.json && mv tmp.$$.json composer.json
jq '.require."silverstripe/framework" = "~3.2.0"' composer.json > tmp.$$.json && mv tmp.$$.json composer.json
@Tom-Alexander
Tom-Alexander / README.md
Created November 12, 2015 21:22
Mailcatcher config
  1. gem install mailcatcher
  2. mailcatcher
  3. brew services restart php54
  4. nginx -s reload
  5. Go to http://mail.dev/
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active February 13, 2024 07:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
Run this in your Mac Terminal (assuming you have the Ionic CLI):
----------------------------------------------------------------
ionic start wkwebviewpolyfilltest
cd wkwebviewpolyfilltest
ionic setup sass
ionic platform add ios
ionic plugin add https://github.com/EddyVerbruggen/cordova-plugin-wkwebview
ionic build
----------------------------------------------------------------
@cjus
cjus / sample-nginx.conf
Last active July 12, 2023 14:59
AngularJS Nginx and html5Mode
server {
server_name yoursite.com;
root /usr/share/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@chtombleson
chtombleson / silverstripe.conf
Created January 30, 2014 07:04
Silverstripe nginx config
server {
listen 80;
server_name example.com;
root /var/www/example.com;
error_log /var/log/example.com/error.log;
access_log /var/log/example.com/access.log;
location / {
try_files $uri @silverstripe;
}
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;