Skip to content

Instantly share code, notes, and snippets.

View vool's full-sized avatar

Keith Phelan vool

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/
@bisubus
bisubus / ES5-ES6-ES2017-ES2019 omit & pick
Last active April 13, 2024 21:03
ES5/ES6/ES2017/ES2019 omit & pick
@martinbean
martinbean / pre-commit
Last active December 19, 2023 22:14
Pre-commit hook to detect if any .php files contain dd()
#!/usr/bin/php
<?php
$files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD | grep "\.php$"');
$files = explode("\n", trim($files));
$exitCode = 0;
foreach ($files as $file) {
if (empty($file)) {
@thaihust
thaihust / dos2unix.md
Created November 2, 2017 01:19 — forked from umidjons/dos2unix.md
Execute dos2unix for directory recursively.

Will recursively find all files inside current directory and call for these files dos2unix command. Would break if you had spaces in file name.

find . -type f -exec dos2unix {} \;

Wouldn't break if you had spaces in file names.

find . -type f -print0 | xargs -0 dos2unix
@dmiro
dmiro / createdbradio.py
Last active August 25, 2023 11:43
Create sqlite database from repository radio-browser.info
import subprocess
import gzip
import os
"""
create sqlite database from repository radio-browser.info
prerequisites:
(1) install sqlite3 (client)
@jqtrde
jqtrde / modern-geospatial-python.md
Last active August 1, 2023 14:50
Modern remote sensing image processing with Python
@mklabs
mklabs / github-flavored-markdown.md
Created March 1, 2011 09:47
GitHub Flavored Markdown #test #github #markdown

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red Violets are blue

@leebyron
leebyron / latlong.pde
Created May 29, 2011 03:50
conversions from Lat/long to 2d map projections - for Processing
/**
* A collection of functions responsible for performing translations between
* longitude/latitude coordinates and points on a 1/1 square
* (which you could then map to pixelspace)
*
* @author leebyron
*/
/**
* lon double x coordinate in radians [-PI,PI)
@loicknuchel
loicknuchel / angularPlugin.js
Created January 21, 2015 10:20
Angular MediaSrv : play audio with Cordova & Ionic apps
angular.module('my.cordova.plugins', ['ionic'])
// for media plugin : http://plugins.cordova.io/#/package/org.apache.cordova.media
.factory('MediaSrv', function($q, $ionicPlatform, $window){
var service = {
loadMedia: loadMedia,
getStatusMessage: getStatusMessage,
getErrorMessage: getErrorMessage
};
@vool
vool / debian_setup.md
Last active June 19, 2020 15:24
Debain standard setup

Debain setup

Default set up for git deploy web-server on debian box [for a laravel site but also pretty generic]

There a good guide (for ubuntu) here

Update and install

apt-get update &amp;&amp; apt-get upgrade