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
#!/bin/sh /etc/rc.common | |
START=10 | |
start() | |
{ | |
uci set wireless.sta.disabled='0' | |
uci commit | |
/etc/init.d/network restart | |
sleep 30 |
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
echo '#!/bin/sh' > /tmp/autologin.sh | |
echo 'count=$(ping -c5 -w5 8.8.8.8 | grep "100% packet loss" | wc -l)' >>/tmp/autologin.sh | |
echo 'if [ "$count" -gt 0 ]; then' >> /tmp/autologin.sh | |
echo ' wget -O /dev/null "http://172.168.1.1/CheckValidUser.php?username=c4&password=xxxx"' >> /tmp/autologin.sh | |
echo ' echo "autologin start"' >> /tmp/autologin.sh | |
echo 'fi' >> /tmp/autologin.sh | |
echo '-------' | |
chmod +x /tmp/autologin.sh | |
echo '#!/bin/sh' > /tmp/check_autologin.sh | |
echo 'START=$(date +%s)' >> /tmp/check_autologin.sh |
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 ESP8266 infomation. | |
* @Author AppStack.CC | |
* @Website http://www.appstack.cc | |
*/ | |
#include <ESP8266WiFi.h> | |
// Thank K.Settakan Suwannawat for explain flash chip id. https://www.facebook.com/groups/ChiangMaiMakerClub/permalink/781221611997934/ | |
// Find flash chip from http://code.coreboot.org/svn/flashrom/trunk/flashchips.h |
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
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri?; | |
} |
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
<?php | |
$start_date = new DateTime('2014-07-01'); // Create Start Date | |
$end_date = new DateTime('2014-07-31'); // Create End Date | |
$interval = DateInterval::createFromDateString('1 day'); | |
$period = new DatePeriod($start_date , $interval, $end_date); | |
$day_of_week = array(); | |
foreach ($period as $dt) | |
{ | |
$day_of_week[] = $dt->format("N"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" type="text/css" href="css/theme product.css"> | |
<link rel="stylesheet" type="text/css" href="css/cssmenu.css"> | |
<link rel="stylesheet" type="text/css" href="css/work.css"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" type="text/css" href="css/theme product.css"> | |
<link rel="stylesheet" type="text/css" href="css/cssmenu.css"> | |
<link rel="stylesheet" type="text/css" href="css/work.css"> |
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
public void ScaraForward(double j1,double j2 ,double j3 ) | |
{ | |
double x; | |
double y; | |
double z; | |
// Convert joint value to postion | |
} |
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
public void TestApi() | |
{ | |
string url = "https://api.github.com/repos/Svl2Nuk3/jtable"; | |
var client = new RestClient(url); | |
var request = new RestRequest(Method.GET); | |
IRestResponse response = client.Execute(request); | |
var content = response.Content; | |
Console.WriteLine(content.ToString()); | |
} |
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
# Step 1 | |
cd ~ | |
# Step 2 | |
vi .bash_profile | |
# Step 3 : Insert this line and chage php path. | |
export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH | |
# Step 4 Save File => :wq |