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/bash | |
# step 1 | |
# download tar.gz from oracle site http://www.oracle.com/technetwork/java/javase/downloads/index.html | |
# for example jre-7u45-linux-i586.tar.gz | |
# step 2 | |
# prepare build tools | |
sudo apt-get install java-package |
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
# turn off the given monitor | |
xrandr --output LVDS --off | |
# enable/disable composting | |
xfconf-query --channel=xfwm4 --property=/general/use_compositing --type=bool --toggle | |
# exit the script if try to use an uninitialized variable | |
set -u | |
# exit the script if any statement returns a non-true return value |
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
# set pass in command line (non-interactive) | |
mysqladmin -u root password "some_new_password" | |
# set pass in command line (interactive) | |
mysqladmin -u root password | |
# login | |
mysql -u[name] -p[pass] [database] | |
# create backup |
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
# /usr/share/anki/anki/importing/csvfile.py | |
import sys | |
csv.field_size_limit(sys.maxsize) |
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
sudo add-apt-repository ppa:hachre/dart | |
sudo apt-get update | |
sudo apt-get install darteditor dartvm dartsdk dartium |
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
'use strict'; | |
var data = { | |
'table 1x1 with no merge': { | |
raw: [ | |
[1] | |
], | |
check: [[1]] | |
}, |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
%component { | |
// The width and height (also including min-width, max-width, min-height and max-height properties) of an element | |
// are calculated as the width/height of the content plus the padding and border. | |
box-sizing: border-box; | |
} |
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
var tries = 100000, | |
encoder = new TextEncoder('utf-8'), | |
example = 'I♥☢𝄢. I\'m a ☢ ☃ that plays 𝄢 guitar and spea̧͈͖ks Ar̽̾̈́͒͑ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜!', | |
time, index; | |
function utf8ToBinaryString ( str ) { | |
var escstr = encodeURIComponent(str); | |
// replaces any uri escape sequence, such as %0A, | |
// with binary escape, such as 0x0A | |
var binstr = escstr.replace(/%([0-9A-F]{2})/g, function ( match, p1 ) { |
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
# it'b better to avoid symlinks | |
# use mount --bind | |
# as root | |
cp -a /root /home/ | |
echo "" >> /etc/fstab | |
echo "/home/root /root none defaults,bind 0 0" >> /etc/fstab | |
# do it now | |
cd / ; mv /root /root.old; mkdir /root; chmod go-rwx /root; mount -a |
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
mkfifo dptmp | |
while true; do | |
read line < dptmp | |
if [[ $line ]]; then | |
echo "processing $line" | |
fi | |
done |
OlderNewer