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
Original String: | |
I couldn't believe that I could actually understand what I was reading: | |
the phenomenal power of the human mind. According to a research team at Cambridge University, | |
it doesn't matter in what order the letters in a word are, the only important thing is that the | |
first and last letter be in the right place. The rest can be a total mess and you can still read | |
it without a problem. This is because the human mind does not read every letter by itself, but the | |
word as a whole. Such a condition is appropriately called Typoglycemia. Amazing, huh? Yeah and you | |
always thought spelling was important. | |
Converted String: |
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 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <IP>[/subnet]" | |
exit 1 | |
fi | |
for ip in $(nmap -sL $1 | awk '/Nmap scan report/{print $NF}'); do { | |
ip=$(echo $ip | tr -d '()') | |
output=$(curl --connect-to :443:$ip:443 --connect-timeout 5 --verbose --head https://www.google.com.hk 2>&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 python | |
#coding: utf8 | |
import gflags | |
import sys | |
import subprocess | |
import json | |
from operator import itemgetter, attrgetter, methodcaller | |
gflags.DEFINE_integer('limit', 2, 'how many full backup point') |
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
{ | |
"metadata": { | |
"name": "pydy" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"metadata": { | |
"name": "Python Tutorials3" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"metadata": { | |
"name": "Python Tutorials 2" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"metadata": { | |
"name": "Python String Tutorials" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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 python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import json | |
import getopt | |
import urllib2 | |
from urllib import urlencode |
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
import simplejson | |
import subprocess | |
USERNAME='user' | |
PROJECT='prj' | |
HOST='192.168.0.1' | |
ls_cmd = "ssh -p 29418 %s@%s gerrit query limit:1000 --current-patch-set --format=json status:open project:%s" % (USERNAME, HOST, PROJECT) | |
submit_cmd = "ssh -p 29418 %s@%s gerrit review --code-review 2 --abandon %s" |
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
delimiter # | |
create trigger fix_dot_account_external_ids after insert on account_external_ids | |
for each row | |
begin | |
SET @external_id = NEW.external_id; | |
if @external_id like 'gerrit:*' then | |
SET @new_external_id = REPLACE(@external_id, 'gerrit:', 'username:'); | |
insert into account_external_ids (account_id, email_address, password, external_id) values (new.account_id, new.email_address, new.password, @new_external_id); | |
end if; |
NewerOlder