Settings for Atom text editor.
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
| #!/bin/bash | |
| percent=$(pmset -g batt | egrep "([0-9]+\%).*" -o | cut -f1 -d'%') | |
| args=("$@") | |
| if [ "${args[0]}" == "debug" ]; then | |
| echo "$percent" | |
| fi | |
| if [ "$percent" -gt "80" ]; then |
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
| # sample nginx config | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /var/www/html; | |
| index index.php index.html index.htm; | |
| #charset koi8-r; | |
| #access_log /var/log/nginx/log/host.access.log main; |
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 ruby | |
| require "nokogiri" | |
| require "open-uri" | |
| wiki_url = "https://en.wikipedia.org/wiki/Main_Page" | |
| doc = Nokogiri::HTML(open(wiki_url)) | |
| article = doc.at_css("div#mp-tfa i:first-child a") |
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
| docker run --name mysql -e MYSQL_ROOT_PASSWORD=1234 -d mysql | |
| docker run --name wordpress --link mysql:mysql -p 80:80 -d wordpress |
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
| infocmp $TERM | sed 's/kbs=^[hH]/kbs=\\177/' > $TERM.ti | |
| tic $TERM.ti |
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
| class FizzBuzz: | |
| def __init__(self, number): | |
| if FizzBuzz.is_valid_number(number): | |
| self.number = number | |
| @property | |
| def result(self): | |
| if FizzBuzz.is_divide_by(self.number, (3 * 5)): | |
| return "FizzBuzz" | |
| elif FizzBuzz.is_divide_by(self.number, 3): |
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
| " File: ltp256.vim | |
| " Maintainer: Lattapon Yodsuwan (clozed2u) | |
| " URL: https://github.com/clozed2u | |
| " Base: {{{ | |
| " The following are the preferred 16 colors for your terminal | |
| " Color Normal Bright | |
| " | |
| " Black #4E4E4E #7C7C7C |
From http://techglimpse.com/install-python-openssl-support-tutorial/
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar zxf Python-2.7.11.tgz
cd Python-2.7.11
vim Modules/Setup.dist
Search for SSL section and edit from