This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encoding file | |
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < file | |
# Decoding file | |
perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.b64 | |
# HMAC-SHA1 | |
perl -MDigest::HMAC_SHA1 -le '$_=Digest::HMAC_SHA1->new($ARGV[0])->add($ARGV[1])->b64digest; $_.="=" x length % 4; print' TestKey TestString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# udev | |
wget https://gist.githubusercontent.com/dex4er/1354710/raw/0f9738c7439cdfb9e4446663d137f91ee153b4d8/etc_udev_rules.d_90-hid-eToken.rules | |
sudo cp etc_udev_rules.d_90-hid-eToken.rules /etc/udev/rules.d | |
sudo service udev reload | |
# required packages | |
sudo apt-get -yy install pcscd opensc | |
# legacy library | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_amd64.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Joomla extension auto installation | |
# Use that for development purpose, don't ever think of using it on a production website. | |
# The developer of that script won't endorse any problem you may encounter by using this script: Use it at your own risk! | |
# Please configure the three first params before using it. | |
# Usage : | |
# ./install.sh | |
# Will try to install every dir in the current dir | |
# ./install.sh directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log4perl.logger.plack = DEBUG, LogfilePlack | |
log4perl.appender.LogfilePlack = Log::Dispatch::File::Stamped | |
log4perl.appender.LogfilePlack.stamp_fmt = %Y-%m-%d | |
log4perl.appender.LogfilePlack.filename = log/error.log | |
log4perl.appender.LogfilePlack.layout = PatternLayout | |
log4perl.appender.LogfilePlack.layout.ConversionPattern = %d{ISO8601}: %c: %m{chomp}%n | |
log4perl.logger.access = DEBUG, LogfileAccess | |
log4perl.appender.LogfileAccess = Log::Dispatch::File::Stamped | |
log4perl.appender.LogfileAccess.stamp_fmt = %Y-%m-%d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is now a module: | |
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines-- | |
var template = require('backtick-template'); | |
// just string | |
const info = 'template'; | |
`some ${info}` === template('some ${info}', {info}); |