Generate a good README use `npx` commmd.
This file contains hidden or 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
| size(200,200); | |
| line(random(200),random(200),random(200),random(200)); | |
| line(random(200),random(200),random(200),random(200)); | |
| line(random(200),random(200),random(200),random(200)); | |
| line(random(200),random(200),random(200),random(200)); | |
| line(random(200),random(200),random(200),random(200)); | |
| line(random(200),random(200),random(200),random(200)); | |
| saveFrame("dar_0308a.jpg"); |
This file contains hidden or 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
| /*****************************************************************************/ | |
| // Function: Get the accelemeter of the x/y/z axis. | |
| // Hardware: Grove - 3-Axis Analog Accelerometer | |
| // Arduino IDE: Arduino-1.0 | |
| // Author: Frankie.Chu | |
| // Date: Jan 11,2013 | |
| // Version: v1.0 | |
| // by www.seeedstudio.com | |
| // | |
| // This library is free software; you can redistribute it and/or |
This file contains hidden or 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
| /* | |
| 這個程式的目標是希望可以激起程式高手願意修改我的程式的熱情。 | |
| arduino tutorial: https://www.arduino.cc/en/Tutorial/BuiltInExamples/Button | |
| 電路圖參考: https://fritzing.org/projects/digital-input-button/ | |
| */ | |
| #define buttonPin 12 | |
| #define ledPin 13 | |
| #define digitalWrite myWrite | |
| int a = 0; // 你是 |
This file contains hidden or 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 setup() { | |
| pinMode(13, OUTPUT); | |
| } | |
| void loop() { | |
| digitalWrite(13, HIGH); | |
| delay(100); // 1000ms = 1s , 100ms = 0.1s | |
| digitalWrite(13, LOW); | |
| delay(100); // 1000ms = 1s , 100ms = 0.1s | |
| } |
This file contains hidden or 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
| int i = 0; | |
| float r=random(255); | |
| float g=random(255); | |
| float b=random(255); | |
| void setup() { | |
| size(300, 300); | |
| noStroke(); | |
| frameRate(1000); | |
| } |
This file contains hidden or 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
| {"dist":"0.633500"} | |
| {"dist":"0.633667"} | |
| {"dist":"0.633833"} | |
| {"dist":"0.634000"} | |
| {"dist":"0.634167"} | |
| {"dist":"0.634333"} | |
| {"dist":"0.634500"} | |
| {"dist":"0.634667"} | |
| {"dist":"0.634833"} | |
| {"dist":"0.635000"} |
This file contains hidden or 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
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
Thanks to Automated Snapshots / Backups via Vultr API And this is Python3 version script used to Automatic snapshots using Vultr API
A more customizable alternative to Vultr's backup feature using Vultr API v1. Tested on Ubuntu 16.04. Run this python3 script on Anywhere to create a snapshot of VPS (which you know IP or it's subid) and rotate out the oldest snapshot(s). Use the BACKUP_TAG_PREFIX prefix field to uniquely id a set of snapshots.
Notice: You can only create 11 snapshots by default.
This file contains hidden or 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
| curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |