MacOS Sierra High comes with preinstalled postfix
. Follow these steps to configure it on a local system:
sudo nano /etc/postfix/sasl_passwd
- Add this to the file
// ==UserScript== | |
// @name AutoPagerizes | |
// @description This is your new userscript, start writing code | |
// @match *://*.* | |
// ==/UserScript== | |
// AutoPagerize | |
// loading next page and inserting into current page. | |
// http://autopagerize.net/ |
#!/bin/bash | |
cat > /usr/local/etc/pf-nat.conf << EOF | |
nat on en0 from vnic1:network to any -> (en0) | |
EOF | |
sudo pfctl -d | |
sudo sysctl -w net.inet.ip.forwarding=1 | |
sudo pfctl -f /usr/local/etc/pf-nat.conf -e |
import objc | |
from Foundation import NSBundle | |
IOKit = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("IORegistryEntryCreateCFProperties", b"IIo^@@I"), | |
("IOPSCopyPowerSourcesByType", b"@I"), | |
("IOPSCopyPowerSourcesInfo", b"@"), |
if exists('g:loaded_lightline') | |
" lightline.vim側で描画するのでdeniteでstatuslineを描画しないようにする | |
call denite#custom#option('default', 'statusline', v:false) | |
endif | |
" lightlineでmodeを描画する時ようのfunction | |
function! MyMode() | |
if &ft == 'denite' | |
" deniteは自分でinsertモード normalモードを管理しているので | |
" lightlineのハイライト関数をdeniteのモードに合わせた値(-- NORMAL -- ならn) |
#!/bin/bash | |
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; | |
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It | |
# only accepts ESC backslash for ST. | |
function print_osc() { | |
if [[ -n $TERM ]] ; then | |
printf "\033Ptmux;\033\033]" | |
else | |
printf "\033]" |
#!/bin/bash | |
# Get current swap usage for all running processes | |
# Erik Ljungstrom 27/05/2011 | |
# Updated: 2013-11-13 Yuichiro Saito | |
SUM=0 | |
OVERALL=0 | |
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do | |
PID=`echo $DIR | cut -d / -f 3` | |
PROGNAME=`ps -p $PID -o comm --no-headers` | |
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` |
#!/usr/public/bin/perl -w | |
use strict; | |
use JSON; | |
use JSON::WebToken; | |
use LWP::UserAgent; | |
use HTML::Entities; | |
my $private_key_string = q[-----BEGIN PRIVATE KEY----- |
#! /usr/bin/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |