Skip to content

Instantly share code, notes, and snippets.

View scratchoo's full-sized avatar
🎯
Focusing

scratchoo

🎯
Focusing
View GitHub Profile
@scratchoo
scratchoo / .htaccess
Created December 15, 2017 18:02
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@scratchoo
scratchoo / ror-provisioning.sh
Last active October 24, 2017 14:37 — forked from arielcr/ror-provisioning.sh
Ruby on Rails Provisioning Script
#!/bin/bash
echo Provisioning Ruby on Rails...
echo =================================
echo - create a deployer user
addgroup admin
adduser deployer --ingroup admin
su deployer
cd
@scratchoo
scratchoo / widget.js
Created August 27, 2017 21:24 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');