Skip to content

Instantly share code, notes, and snippets.

@hatzopoulos
hatzopoulos / sed1line.txt
Last active March 8, 2018 06:51 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file. Useful One-Line Scripts For SED (Unix Stream Editor). From http://sed.sourceforge.net/sed1line.txt
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
@hatzopoulos
hatzopoulos / fftb.php
Last active October 5, 2015 22:07 — forked from rewmike/fftb.php
fftb.php
<?php
// Set content type and disable encoding
header('Content-Type: text/html; charset=UTF-8');
while (@ob_get_level()) ob_end_flush();
ob_start();
// Send some content
function padding () {
#!/bin/bash
set -e
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another