Skip to content

Instantly share code, notes, and snippets.

@stevepop
stevepop / README.md
Last active October 10, 2015 19:17 — forked from sandfox/README.md
Launch scripts for various servers

Run this using the following:

curl -L https://raw.github.com/gist/3737938/{FILENAME}.sh | sudo bash -s
@stevepop
stevepop / nginx_config
Created September 20, 2012 12:14
Nginx Vhost Config For Frameworks
Since I am using Nginx as a web server, I have included the virtual host configuration below as it took me quite a while to understand Nginx setup and how it handles rewrite rules.
Virtual Site config for the Silex Tutorial
server {
listen 80;
server_name silextut.local;
root /mnt/hostnfs/silextut/web;
index index.php;
@stevepop
stevepop / windows_ubuntu_dev.sh
Created September 24, 2012 12:51
Setup of Dev Environment for Ubuntu VM on Windows host
#!/bin/bash
cat "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
apt-get install -y python-software-properties
add-apt-repository ppa:nginx/stable -y
add-apt-repository ppa:ondrej/php5 -y
apt-get update
<div class="modal hide fade" id="confirm-dialog">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Confirm</h3>
</div>
<div class="modal-body">
&nbsp;
</div>
<div class="modal-footer">
<a href="#" class="btn btn-danger">Ok</a>

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@stevepop
stevepop / eloquent.md
Last active August 29, 2015 14:07 — forked from msurguy/eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@stevepop
stevepop / esqueries
Last active August 29, 2015 14:08
Sample Elasticsearch Queries
GET /products/_mapping?pretty=true
GET /products_multi_tagged/_mapping?pretty=true
POST products_multi_tagged/_search?pretty=true
{
"query": {
"bool": {
"should": [
{

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@stevepop
stevepop / configure-mailgun
Created July 5, 2016 15:41 — forked from jgeewax/configure-mailgun
Script to configure Postfix for Mailgun
#!/bin/bash
# Configuration for the script
POSTFIX_CONFIG=/etc/postfix/main.cf
POSTFIX_SASL=/etc/postfix/sasl_passwd
function confirm () {
read -r -p "${1:-Are you sure? [Y/n]} " response
if [[ $response == "" || $response == "y" || $response == "Y" ]]; then
echo 0;