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
$ ls -ls | awk '{print $7,$11}' |
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
# WARNING: here getArtist() implicitly converts unicode into str... | |
self.tag = player.getMusicInfoTag() | |
artist = self.tag.getArtist() | |
title = self.tag.getTitle() | |
# skip weird cases when music stop (title == '') or is streaming (title == 'Streaming...') | |
if not title or title.lower() == 'streaming...': | |
print 'title = ' + title | |
return |
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
tell application "Safari" to activate | |
tell application "Safari" | |
tell window 1 | |
set current tab to (make new tab with properties {URL:"http://hangout.google.com"}) | |
end tell | |
delay 5 | |
tell application "System Events" | |
-- navigate to "Name this hangout" | |
repeat 10 times | |
keystroke tab |
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
#include <Servo.h> | |
Servo myservo; | |
int servoPin = 9; | |
int switchPin = 2; | |
void setup() | |
{ | |
myservo.attach(servoPin); |
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
// See http://bildr.org/2011/02/74hc595/ | |
int SER_Pin = 11; //pin 14 (Data) on the 75HC595 | |
int RCLK_Pin = 9; //pin 12 (Latch) on the 75HC595 | |
int SRCLK_Pin = 8; //pin 11 (Clock) on the 75HC595 | |
//How many of the shift registers - change this | |
#define number_of_74hc595s 8 |
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
% | |
% Draw random dots within black filled circle | |
% Dots number from 89 to 299 | |
% | |
for n = 89:299 | |
% Draw filled circle | |
f = figure; | |
filledCircle([0,0], 1,1000, 'k'); |
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); |
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
<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
$ sudo raspi-config | |
$ sudo apt-get update | |
$ sudo apt-get install supervisor |