Also see reference
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
wget http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam/pdfjam_latest.tgz | |
cp pdfjam.conf ~/.pdfjam.conf | |
# pdflatex='/Library/TeX/texbin/pdflatex' | |
# paper='letterpaper' | |
./pdfjam --fitpaper true --nup 2x2 --delta '1mm 1mm' --scale 1.0 input.pdf --outfile output-4up.pdf |
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
# Create a new branch locally | |
$ git checkout -b [branch] | |
# Create and push the new branch to orign | |
$ git push origin [branch] | |
# Merge branch to master | |
$ git checkout master | |
$ git merge [branch] |
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
# List which process is listening upon port 5000 | |
$ lsof -i :5000 | |
# kill command with PID 12345 | |
$ kill -9 12345 |
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
# https://devcenter.heroku.com/articles/getting-started-with-django | |
# Regions | |
$ heroku regions | |
$ heroku create --region eu | |
# Create | |
$ heroku create | |
$ git push heroku master |
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 time | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setwarnings(False) | |
GPIO.setup(8, GPIO.OUT, initial=GPIO.HIGH) | |
GPIO.setup(10, GPIO.OUT, initial=GPIO.HIGH) | |
while (True): |
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
$ sudo raspi-config | |
$ sudo apt-get update | |
$ sudo apt-get install supervisor |
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
<form action="https://shenghuo.alipay.com/send/payment/fill.htm" method="post" target="_blank" accept-charset="GBK" id="alipayForm"> | |
<input name="optEmail" type="hidden" value="zph61@139.com" /> | |
<input name="payAmount" type="hidden" value="1.00" /> | |
<input id="title" name="title" type="hidden" value="捐赠给”前端技术分享”网站" /> | |
<input name="memo" type="hidden" value="文章写的不错,支持站长,我来捐赠鼓励的!" /> | |
<input name="pay" type="image" src="https://img.alipay.com/sys/personalprod/style/mc/btn-index.png" width="250" height="58"> | |
</form> |
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
void loop() | |
{ | |
if ( connected ) | |
{ | |
int packetSize = Udp.parsePacket(); | |
if ( packetSize != 0 ) { | |
Udp.read( data, numPins ); | |
Serial.println( "Data received" ); | |
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%% Example: | |
%%% | |
%%% Create a 3000Hz triangel wave data for 3 seconds, and | |
%%% play the wave data at 44100Hz (default) sample rate, also | |
%%% save to .wav file. | |
%%% | |
%%% | |
%%% wave = OSCILLATOR('Triangle', 3, 3000); | |
%%% soundsc(wave, 44100); |