Skip to content

Instantly share code, notes, and snippets.

View taunoha's full-sized avatar

Tauno Hanni taunoha

View GitHub Profile
@loziju
loziju / macosx-configure-postfix-as-relay.md
Last active April 4, 2025 12:03
Configure postfix as relay for OS X
@noelboss
noelboss / git-deployment.md
Last active March 21, 2026 00:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@s22su
s22su / php-generate-estonian-personal-code.php
Created January 28, 2016 13:58
Generate Estonian personal (id) code
<?php
function cenerateDummyIdCode() {
$multiplier = [
[1, 2, 3, 4, 5, 6, 7, 8, 9, 1],
[3, 4, 5, 6, 7, 8, 9, 1, 2, 3],
];
// get random date from 1970-01-28 to 1990-01-28
$birthday = mt_rand(2382512, 633534512);
@danielbachhuber
danielbachhuber / collection-filter.js
Last active January 29, 2025 04:58
Add a custom taxonomy dropdown filter to the WordPress Media Library
(function(){
/**
* Create a new MediaLibraryTaxonomyFilter we later will instantiate
*/
var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({
id: 'media-attachment-taxonomy-filter',
createFilters: function() {
var filters = {};
// Formats the 'terms' we've included via wp_localize_script()
@kany
kany / sendmail_setup.md
Last active January 27, 2025 11:55
Setup SENDMAIL on Mac OSX Yosemite
@davidimoore
davidimoore / _flexbox-grid.scss
Last active August 29, 2015 14:07
Flex Grid Values with Bourbon Mixins
.flex-container{
box-sizing: border-box;
padding: .5rem;
}
.flex-row{
box-sizing: border-box;
@include display(flex);
@include box-orient(horizontal);
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git