start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
/** | |
* This is an example of a practical encoder and decoder for base-62 data in PHP | |
* It differs from the majority of examples in that it's fast enough for moderate data sizes, unlike multiprecision converters | |
* To be practical, base-62 encoding needs to use internal chunking and padding because base-62 does not fit exactly into any integral number of bits | |
* This means the output is not quite compatible with multiprecision conversions, | |
* but the encoded data retains all the desirable properties of base-62, so (unlike any base-64 encoding) it's URL, DNS, email address and pathname safe | |
* @author Marcus Bointon <[email protected]> | |
* @copyright 2011 Marcus Bointon | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License |
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color
.
This is easy with homebrew:
brew install screen
/ipv6 firewall filter | |
add action=accept chain=input comment="Allow established connections" connection-state=established disabled=no | |
add action=accept chain=input comment="Allow related connections" connection-state=related disabled=no | |
add action=accept chain=input comment="Allow limited ICMP" disabled=no limit=50/5s,5 protocol=icmpv6 | |
add action=accept chain=input comment="Allow UDP" disabled=no protocol=udp | |
add action=drop chain=input comment="" disabled=no | |
add action=accept chain=forward comment="Allow any to internet" disabled=no out-interface=sit1 | |
add action=accept chain=forward comment="Allow established connections" connection-state=established disabled=no | |
add action=accept chain=forward comment="Allow related connections" connection-state=related disabled=no | |
add action=drop chain=forward comment="" disabled=no |
#!/bin/sh | |
#sudo apt-get install -y curl | |
#curl -L tinyurl.com/dxgshortcuts | sh | |
sudo apt-get install -y git | |
curl https://gist.githubusercontent.com/daxxog/615fae60e1974828e865/raw/rmr-dg-clone-install.sh | sh | |
curl https://gist.githubusercontent.com/daxxog/202792236c0a21339ab4/raw/install-git-shortcuts.sh | sh | |
curl https://gist.githubusercontent.com/daxxog/cfb990f5cbe6805c0cf7/raw/uid-gid-install.sh | sh | |
curl https://gist.githubusercontent.com/daxxog/8d9895d01f4f1ffea1a1/raw/pushbranch-install.sh | sh |
First, install arch-install-scripts:
sudo pacman -S --needed arch-install-scripts
Secondly, mount your partitions in all the internal hard drives.
Thirdly, generate and validate your config by piping it out to stdout:
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
#!/bin/bash | |
#curl -L https://gist.githubusercontent.com/daxxog/a2f5db9cbe5fd02770764ba183dc6504/raw/clambuntu.sh | sh | |
sudo /etc/init.d/clamd stop | |
cd ~ | |
mkdir dev | |
cd dev | |
CLAMVERSION=1.4.17 | |
rm -rf "clam-$CLAMVERSION/" | |
curl -L "https://github.com/nochowderforyou/clams/releases/download/v$CLAMVERSION/clam-$CLAMVERSION-linux64.tar.gz" | tar xvz |
#!/bin/bash | |
#sudo apt install -y curl | |
#curl -L tinyurl.com/ssh-0-dxg | sh | |
#curl -L tinyurl.com/dxg-0-ssh | sh | |
sudo apt update | |
sudo apt install -y openssh-server tightvncserver autocutsel openbox-lxde-session net-tools | |
#sshin config | |
curl -L bit.ly/29v2OyX | sh |