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 subprocess | |
def getClipboardData(): | |
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE) | |
retcode = p.wait() | |
data = p.stdout.read() | |
return data | |
def setClipboardData(data): | |
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE) |
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
on alfred_script(q) | |
-- your script here | |
set current to output volume of (get volume settings) | |
set old to current | |
set current to current + 10 | |
if (current > 100) then | |
set current to 100 | |
end if |
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/python | |
import sys | |
import os | |
""" This is for concatenating all the separeted words from Kindle app.. I just | |
want them be merged again.. | |
Input (copied directly from Kindle app): | |
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
CC=g++ | |
HDIR=./include/ | |
CFILES=main.cpp server.cpp | |
OUTNAME=server | |
# Something like this will prepend "./src/" to each of CFILES names, thus setting the correct full path! | |
CFULL=${CFILES:%=./src/%} | |
all: | |
$(CC) -o $(OUTNAME) -pthread -I $(HDIR) $(CFULL) |
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
@media screen and (min-width: 1000px) { | |
body { | |
width: 960px; | |
margin: auto; | |
} | |
} | |
@media screen and (max-width: 1000px) { | |
body { | |
width: 95%; |
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
<html> | |
<head> | |
<title>Alice's Adventures in Wonderland -- Chapter I</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> | |
</script> | |
</head> | |
<body> | |
<h2>CHAPTER I</h2> | |
<h2>Down the Rabbit-Hole</h2> | |
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 subprocess | |
def setClipboardData(data): | |
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE) | |
p.stdin.write(data) | |
p.stdin.close() | |
retcode = p.wait() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="author" content="Andriy Lin"/> | |
<title>所有名字</title> | |
<style type="text/css"> | |
body { | |
margin: 50px; | |
} |
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
// check if support Web Audio | |
var supportWebAudio = (function(){ | |
// check <audio> tag first | |
var ele = document.createElement('audio'); | |
if (!ele) { | |
return false; | |
} | |
// check Web Audio's context | |
try { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> Testing modifying context of canvas. -- Andriy </title> | |
</head> | |
<body> | |
<p>Hello Andriy</p> | |
<h2>Raw</h2> |
NewerOlder