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
#!/bin/bash | |
URL="https://www.zq12369.com/" | |
DATA=`curl --noproxy "*" -s $URL` | |
FORECAST_DATA=`echo $DATA | pup 'div[class="forecast"] json{}'` | |
AQI_DATA=`echo $DATA | pup 'div[class="aqidetail"] json{}' | jq '.[0].children'` | |
curl -s 'https://www.zq12369.com/' | pup 'div[class="aqibg aqibanner1"]' | pup 'div[class="aqi"] json{}' | jq -cMr '.[0].text' |
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
#!/bin/bash | |
# <bitbar.title>Homebrew Updates</bitbar.title> | |
# <bitbar.author>killercup</bitbar.author> | |
# <bitbar.author.github>killercup</bitbar.author.github> | |
# <bitbar.desc>List available updates from Homebrew (OS X)</bitbar.desc> | |
exit_with_error() { | |
echo "err | color=red"; | |
exit 1; | |
} |
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
#!/bin/bash | |
JQ_BIN=/usr/local/bin/jq | |
#MENUFONT="size=13 font=UbuntuMono-Bold" | |
MENUFONT="size=15" | |
COLORS=("#0ed812" "#ffde33" "#ff9933" "#cc0033" "#660099" "#7e0023") | |
CURRENT_WEA_URL="https://tianqiapi.com/api/?version=v6&appid=76961778&appsecret=K1Evb4rc" | |
DATA=`curl --noproxy "*" -s "${CURRENT_WEA_URL}"` |
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
#!/bin/bash | |
echo -e "\033[34m[umount] /home/hcy/mycloud/data... \033[0m" | |
umount /home/hcy/mycloud/data > /dev/null 2>&1 | |
echo -e "\033[34m[umount] /home/hcy/mycloud/public... \033[0m" | |
umount /home/hcy/mycloud/public > /dev/null 2>&1 | |
echo -e "\033[34m[umount] /home/hcy/mycloud/tddownloads... \033[0m" | |
umount /home/hcy/mycloud/tddownloads > /dev/null 2>&1 | |
echo -e "\033[34m[mount] /nfs/Data to /home/hcy/mycloud/data... \033[0m" |
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
#! /bin/bash | |
#set -x | |
VERSION="1.6.1" | |
JQ_BIN=jq | |
LAST_TIME_FILE='/tmp/wea_last_time' | |
LAST_WEATHER='/tmp/wea_last_weather' |
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
Dim s | |
s = InputBox("当前Windows系统序列号为:", "Windows序列号", GetWindowsSN) | |
WScript.Quit | |
'取得当前Windows序列号函数 | |
Function GetWindowsSN() | |
Const HKEY_LOCAL_MACHINE = &H80000002 | |
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion" |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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 "SSLBuffer.h" | |
SSLBuffer::SSLBuffer() | |
:ssl(NULL) | |
,read_bio(NULL) | |
,write_bio(NULL) | |
,write_to_socket_callback(NULL) | |
,write_to_socket_callback_data(NULL) | |
,read_decrypted_callback(NULL) | |
,read_decrypted_callback_data(NULL) |
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
class Linux_0_01 | |
{ | |
int restart_syscall(); //0 | |
int exit(); //1 | |
int fork(); //2 | |
int read(); //3 | |
int write(); //4 | |
int open(); //5 | |
int close(); //6 | |
int waitpid(); //7 |
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
/** | |
* \file include/stx/btree.h | |
* Contains the main B+ tree implementation template class btree. | |
*/ | |
/* | |
* STX B+ Tree Template Classes v0.9 | |
* Copyright (C) 2008-2013 Timo Bingmann <tb@panthema.net> | |
* | |
* Boost Software License - Version 1.0 - August 17th, 2003 |
NewerOlder