Skip to content

Instantly share code, notes, and snippets.

@alvan
alvan / ubuntu_proftpd.sh
Last active December 28, 2016 10:02
install proftpd on ubuntu
#!/bin/bash
# Proftpd
#apt-get --force-yes -y update
#apt-get --force-yes -y upgrade
rm -rf /etc/proftpd
apt-get --force-yes -y install proftpd
echo "
@alvan
alvan / quicksort.php
Last active August 29, 2015 14:04
quicksort(Jon Bently<Beautiful code>)
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'on');
function quicksort(&$a, $l, $r)
{
if ($l >= $r) return;
/**
* {a}. item($a[$l]) is the pivot;
@alvan
alvan / Gits
Created August 15, 2017 03:38
Git 实用命令
# Git 推送新的仓库
git remote add origin git@github.com:luokr/doc.luokr.com.git
git push -u origin master
# Git 删除所有远程tags
git show-ref --tag | awk '/(.*)(\s+)(.*)$/ {print ":" $2}' | xargs git push origin
# Git 删除所有本地tags