This file contains hidden or 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
# create and encrypt ~/.msmtp/secrets.gpg | |
mkdir -p ~/.msmtp | |
echo -e "password\n" | gpg -e -r [your_gpg_id] -o ~/.msmtp/secrets.gpg | |
# in `.msmtprc` change the password to passwordeval to launch an external program. | |
passwordeval "gpg -q --for-your-eyes-only --no-tty -d ~/.msmtp/secrets.gpg" |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
## from https://github.com/yanunon/NeteaseCloudMusic | |
''' | |
Created on 2013-06-07 19:28 | |
@author: Yang Junyong <[email protected]> | |
''' |
This file contains hidden or 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
## from https://gist.github.com/scturtle/5972996 | |
import re | |
import os | |
import sys | |
import md5 | |
import json | |
import random | |
import requests |
This file contains hidden or 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
FROM centos:latest | |
MAINTAINER Fitz Abucay <[email protected]> | |
RUN yum update -y | |
RUN yum install -y deltarpm | |
RUN yum install -y java-1.7.0-openjdk-headless | |
ENV VERTX_HOME /opt/vertx | |
RUN mkdir -p $VERTX_HOME && \ |
This file contains hidden or 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
# install perlbrew | |
sudo yum install -y perl perl-CPAN perl-CPAN-Meta | |
sudo cpan App::cpanminus | |
sudo cpanm install App::perlbrew | |
# install cpanm and perl latest | |
perlbrew install-cpanm | |
perlbrew install-patchperl | |
perlbrew install 5.22.0 |
This file contains hidden or 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
# update the box | |
sudo yum update -y | |
sudo yum clean all | |
# fill the empty spaces with zeroes | |
sudo dd if=/dev/zero of=/boot/EMPTY bs=1M | |
sudo rm -f /boot/EMPTY | |
sudo dd if=/dev/zero of=/EMPTY bs=1M | |
sudo rm -f /EMPTY |
This file contains hidden or 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
# build docker config | |
docker build -t [name:tag] . | |
# inspecting containers | |
docker inspect [container-id] | |
# create an image from a container | |
docker commit -a [author] -m [message] [container-id] [name:tag] | |
# compare docker container with image |
This file contains hidden or 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
FILENAME: References the current input file. | |
FNR: References the number of the current record relative to the current input file. For instance, if you have two input files, this would tell you the record number of each file instead of as a total. | |
FS: The current field separator used to denote each field in a record. By default, this is set to whitespace. | |
NF: The number of fields in the current record. | |
NR: The number of the current record. | |
OFS: The field separator for the outputted data. By default, this is set to whitespace. | |
ORS: The record separator for the outputted data. By default, this is a newline character. | |
RS: The record separator used to distinguish separate records in the input file. By default, this is a newline character. |
This file contains hidden or 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 autoread so there are no interactive Load File option | |
:set ar | |
# save the command using tee and discard tee echo | |
:w !sudo tee % > /dev/null |
This file contains hidden or 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
# Saving Sessions | |
:mksession ~/cs.vim | |
# Loading Sessions | |
:source ~/cs.vim |