Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
❤️💣s

James whoacowboy

💭
❤️💣s
View GitHub Profile
@rostockahoi
rostockahoi / imagick3.4.3-PHP7.2-forge.sh
Last active Feb 23, 2020 — forked from jackmu95/imagick3.4.3-PHP7.1-forge.sh
Install Imagick 3.4.3 on PHP 7.2 server (Laravel Forge)
View imagick3.4.3-PHP7.2-forge.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
@dtomasi
dtomasi / default
Last active Nov 19, 2020
Brew Nginx PHP7
View default
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;
}
@pascalbaljet
pascalbaljet / imagick-3.4.0-PHP7-forge.sh
Last active Nov 26, 2020
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
View imagick-3.4.0-PHP7-forge.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.0.tgz
tar xvzf imagick-3.4.0.tgz
@brwnll
brwnll / form_macro.php
Last active Sep 7, 2020
Laravel 4 form inputs for Number and Telephone
View form_macro.php
<?php
/***
* If you prefer automatic updates or using packages, this is available as a composer
* package: https://github.com/smalldogs/html5inputs
*
* 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
@subfuzion
subfuzion / mongo-autostart-osx.md
Last active Sep 30, 2020
mongo auto start on OS X
View mongo-autostart-osx.md

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)

@yyx990803
yyx990803 / nl.sh
Last active Sep 25, 2020
npm list only top level modules.
View nl.sh
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
@alexnederlof
alexnederlof / selenium-start-stop.sh
Created Nov 20, 2012
Selenium start-stop script
View selenium-start-stop.sh
#!/bin/bash
# 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
PORT=4443
DESC="Selenium server"
@jlong
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
You can’t perform that action at this time.