Skip to content

Instantly share code, notes, and snippets.

View azimidev's full-sized avatar
:octocat:
Pro

Azimi azimidev

:octocat:
Pro
View GitHub Profile
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@jookyboi
jookyboi / README.md
Created March 30, 2013 01:11
Example using the marked.js README

marked

A full-featured markdown parser and compiler, written in javascript. Built for speed.

Benchmarks

node v0.4.x

$ node test --bench
@jimothyGator
jimothyGator / README.md
Last active April 25, 2024 18:00
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@jperler
jperler / chunk.js
Last active December 8, 2017 01:05
Array chunking function for Underscore.js. Usage: _.chunks([1,2,3,4,5,6,7], 2) => [[1,2],[2,3],[4,5],[5,6],[7]]
_.mixin({
chunks: function(arr, size) {
var len = arr.length,
chunk_len = Math.ceil(len/size),
chunks = [];
for (var i = 0; i < chunk_len; i++) {
chunks.push(arr.slice(i*size, (i+1)*size));
}
return chunks;
}
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@danharper
danharper / a.md
Last active September 2, 2020 17:13
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.

@shipstar
shipstar / services.md
Last active May 6, 2019 05:10
GitHub + Kanban

Spent a couple minutes poking around at kanban-like alternatives/supplements to labeling:

GitHub uses this and Huboard internally for some projects. Supported by Rally, so probably not going away anytime soon.

GitHub uses this and Waffle internally for some projects.

Looks interesting. (Marking issues from the command-line? Sweet!) It's also pricey.

@carlessanagustin
carlessanagustin / auto-refresh-checkbox.js
Last active August 27, 2018 14:15
(Javascript) Auto refresh checkbox
<!-- add Javascript in html head -->
<script>
var reloading;
var refresh_time = 30000;
function checkReloading() {
if (window.location.hash=="#autoreload") {
reloading=setTimeout("window.location.reload();", refresh_time);
document.getElementById("reloadCB").checked=true;
}
@taylorotwell
taylorotwell / gist:db67dd369b00022850b4
Last active November 16, 2021 08:33
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@dillinghamio
dillinghamio / laravel-spark-rotating-pricing-table.md
Last active August 13, 2019 13:53
Laravel Spark Pricing Table

Rotating Pricing Table for Laravel Spark

Can be placed anywhere, try it out on welcome.blade.php


Laravel Spark Pricing Table ###If you're using team plans just swap out $sparkPlans = Spark::plans(); with $sparkPlans = Spark::teamPlans();