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
My current firefox version is 26 (on Ubuntu). It's said to be a bad SSL client. | |
Check yours here: https://www.howsmyssl.com | |
The issues on version 26 are supported SSL version and the cipher suit used. | |
I managed to fixed this by using following about:config settings | |
security.tls.version.max = 3 (TLS v1.2) | |
security.ssl3.rsa_fips_des_edes_sha = false |
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
# Fish port of Marcin Kulik's newscratch script | |
# Read more and fin \d bash/zsh scripts here: | |
# http://www.ku1ik.com/2012/05/04/scratch-dir.html | |
function new-scratch | |
set cur_dir "$HOME/scratch" | |
set dir_suffix (date +'%s') | |
set new_dir "$HOME/tmp/scratch-$dir_suffix" | |
mkdir -p $new_dir | |
ln -nfs $new_dir $cur_dir |
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 | |
#Show date and time in other time zones | |
ZONEINFO=/usr/share/zoneinfo/posix/ | |
FORMAT='%a %F %T' | |
query=$(echo $1 | tr '[:upper:]' '[:lower:]') | |
case "$query" in | |
au | aus ) |
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/bin/env bash | |
# This script helps you easily set routing tables to allow you use | |
# two different network connections. | |
# I use this to use My mobile broadband connection to access internet | |
# while retaining access to office network for internal stuff. | |
# Use 'route -n' to view current routing table. | |
#set your preferred defaults here | |
PRIMARY_GW="192.168.8.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
#!usr/bin/env bash | |
# This script accepts a directory name and classifies | |
# portrait and landscape images in that directory. | |
if [ $# == 0 ];then | |
echo "$0 <path to image directory>" | |
exit 1 | |
else | |
DIR=$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
function za | |
## Fish shell port of za https://gist.github.com/chanux/1119556 | |
## What The Fish? : http://wp.me/p1rVu-bO | |
## | |
## To use za as a Fish function, just copy paste the script and enter | |
## Then run func_save za | |
## Now you can use za on your Fish <">< | |
if [ -z $argv[1] ] | |
set za_mark 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
function za() | |
{ | |
## I added this in my bashrc so that I can easily | |
## jump back in my directory tree. | |
## There's probably a better way of doing this. | |
## But I was bored anyway. | |
## Backstory: https://chanux.wordpress.com/2012/08/09/no-more-cd-dot-dot-slash/ | |
## See it in my bashrc: https://github.com/chanux/dotfiles/blob/master/bash/aliases#L25 | |
## Usage: za <number> |
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
How to create encrypted virtual disk (with luks) | |
1) First we create a file with random data in it. You can chose a size that matches your needs. In this example I’m making a 20MB virtual disk so I will create a 20MB file in this step. | |
$ dd if=/dev/urandom of=~/sekret bs=1M count=20 | |
Here, the dd command creates 20 1MB blocks and fill it with random data. ~/sekret means that we create the device named sekret in your home directory. You can chose a file name you like and also a path you like. | |
2) Next we need to create a block device from the file. For that find a free loop device with |
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
#/etc/yum.repos.d/mongodb.repo | |
[mongodb] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
gpgcheck=0 |
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
#DOCKER-VERSION 0.6.1 | |
# Build the image of ubuntu 12.04 LTS | |
from ubuntu:precise | |
# Run apt-get update | |
run apt-get -y update | |
# Install LAMP | |
run DEBIAN_FRONTEND=noninteractive apt-get -y install lamp-server^ |
OlderNewer