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
<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';

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;
@stevepop
stevepop / DumpSqlServiceProvider.php
Created September 13, 2017 16:25 — forked from tomcastleman/DumpSqlServiceProvider.php
Laravel Query Builder Dump SQL Macro
<?php
namespace App\Providers;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\ServiceProvider;
class DumpSqlServiceProvider extends ServiceProvider
{
public function boot()
@stevepop
stevepop / README.md
Created May 13, 2018 00:11 — forked from Alymosul/README.md
Downgrade PHP 7.2 to 7.1 on Laravel Forge

Install php7.1 related stuff..

apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
php7.1-cli php7.1-dev \
php7.1-pgsql php7.1-sqlite3 php7.1-gd \
php7.1-curl php7.1-memcached \
php7.1-imap php7.1-mysql php7.1-mbstring \
php7.1-xml php7.1-zip php7.1-bcmath php7.1-soap \
php7.1-intl php7.1-readline php-xdebug php-pear php7.1-fpm
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():