Skip to content

Instantly share code, notes, and snippets.

View whoacowboy's full-sized avatar

James whoacowboy

View GitHub Profile
rostockahoi /
Last active February 23, 2020 14:19 — forked from jacobmllr95/
Install Imagick 3.4.3 on PHP 7.2 server (Laravel Forge)
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
tar xvzf imagick-3.4.3.tgz
brwnll / form_macro.php
Last active September 7, 2020 09:46
Laravel 4 form inputs for Number and Telephone
* If you prefer automatic updates or using packages, this is available as a composer
* package:
* Thank you to @silentcoast for the adding the support of non-valued attributes (such as `required`)
* This file allows you to use the other 11 HTML elements the same way as text, email, and URL.
* 1. Create the folder /app/misc, or use your preferred directory
pascalbaljet /
Last active November 26, 2020 09:10
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
tar xvzf imagick-3.4.0.tgz
subfuzion /
Last active March 2, 2022 00:57
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

alexnederlof /
Created November 20, 2012 19:49
Selenium start-stop script
# Note that this script requires you to have
# an X window running on Display :90
# This can be done by running: /usr/bin/Xvfb :90 -ac -screen 0 1024x768x8 &
# You can save this script as /etc/init.d/selenium to start and stop selenium
DESC="Selenium server"
fireonmac / index.html
Created March 30, 2022 06:15 — forked from redgeoff/index.html
Pinch Zoom And Pan With HammerJS
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport"
content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<title>Pinch Zoom</title>
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
yyx990803 /
Last active March 5, 2024 01:24
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
guillochon /
Last active March 8, 2024 23:56
Instructions on how to SSH on airplane WiFi that blocks port 22

Using SSH through airplane WiFi that blocks port 22

Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi