Skip to content

Instantly share code, notes, and snippets.

View savepong's full-sized avatar

Pongsiri Pisutakarathada savepong

View GitHub Profile
@savepong
savepong / AppServiceProvider.php
Last active January 9, 2018 09:49
Laravel : Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
@savepong
savepong / key-bindings.sublime-keymap
Created November 14, 2017 05:44
Modified Sublime Key Bindings
[
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["command+shift+b"], "command": "reindent" , "args": {"single_line": false}},
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
]
@savepong
savepong / remove-master-password.sh
Last active June 2, 2017 13:03
Master Password issues after upgrading to SmartSVN 9.1
rm /Users/[Your Mac]/Library/Preferences/SmartSVN/9.2/passwords
@savepong
savepong / sublime-cli.sh
Created June 1, 2017 06:21
Launch Sublime Text 3 from the command line
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
@savepong
savepong / phalconphp_php7_ubuntu_16_04.sh
Created May 4, 2017 12:36 — forked from Tosyn/phalconphp_php7_ubuntu_16_04.sh
PhalconPhp with PHP7 Installation on Ubuntu 16.04
#!/bin/bash
# PhalconPhp with PHP7 installation on ubuntu:16.04
sudo apt-get update
sudo apt-get install -y php7.0-fpm \
php7.0-cli \
php7.0-curl \
php7.0-gd \
@savepong
savepong / date-only.sql
Created April 4, 2017 14:18
MySQL/SQL: Group by date only on a Datetime column
SELECT DATE(latest_update) DateOnly FROM users GROUP BY DateOnly LIMIT 10
@savepong
savepong / modify_git.sh
Last active March 27, 2017 13:42
Bitbucket Modify your Git remote URLs
# 1. Navigate to your repository's directory in a terminal window using the command cd path/to/your/repository.
# 2. Run the following command (which modifies the fetch URL) from your terminal window:
# for SSH
git remote set-url origin git@bitbucket.org:{new team or account name}/{repository name}.git
# for HTTPS
git remote set-url origin https://{username}@bitbucket.org/{new team or account name}/{repository name}.git
# 3. Run the following command (which modifies the push URL) from your terminal window:
# for SSH
@savepong
savepong / showerror.php
Created March 8, 2017 09:43
PHP Show All Error
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);