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 | |
######################################### | |
#Function: install_nginx | |
#Usage: bash install_nginx.sh | |
#Author: melice | |
#Version: 1.0 | |
######################################### | |
wget http://nginx.org/keys/nginx_signing.key | |
sudo apt-key add nginx_signing.key |
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 | |
######################################### | |
#Function: auto_iptables | |
#Usage: bash auto_iptables.sh | |
#Author: melice | |
#Version: 1.0 | |
#Origin: vpser.net | |
# for ubuntu only | |
######################################### |
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
unit ListviewHelper; | |
interface | |
uses System.SysUtils, Vcl.ComCtrls; | |
type | |
TListviewHelper = class helper for TListview | |
public | |
procedure SetRowCount(Count: Integer; Compacted: Boolean = False); |
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
<?php | |
$handle = fopen("http://www.youseeme.com/bi/m/api/save/todata3.json", "rb"); | |
$result = stream_get_contents($handle); | |
fclose($handle); | |
$data = json_decode($result, true); | |
$keys = array_keys($data[0]); | |
echo '<table class="dataintable">'; | |
echo "<tr>"; | |
foreach ($keys as $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
uses | |
iOSapi.Foundation, iOSapi.MediaPlayer, FMX.Platform.iOS; | |
Type | |
TForm1 = Class( TForm ) | |
Procedure FormCreate( Sender: TObject ); | |
Private |
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
#!/etc/bash | |
wget -q -O - http://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - | |
echo "deb http://pkg.jenkins.io/debian binary/" | sudo tee -a /etc/apt/sources.list.d/jenkins.list | |
sudo apt-get update | |
sudo apt-get install -y jenkins |
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
#!/etc/bash | |
#jenkins.stable.sh | |
wget -q -O - http://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - | |
echo "deb http://pkg.jenkins.io/debian-stable binary/" | sudo tee -a /etc/apt/sources.list.d/jenkins.list | |
sudo apt-get update | |
sudo apt-get install -y jenkins |
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
function loadNprepare($url,$encod='') { | |
$content = file_get_contents($url); | |
if (!empty($content)) { | |
if (empty($encod)) | |
$encod = mb_detect_encoding($content); | |
$headpos = mb_strpos($content,'<head>'); | |
if (FALSE=== $headpos) | |
$headpos= mb_strpos($content,'<HEAD>'); | |
if (FALSE!== $headpos) { | |
$headpos+=6; |
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
<?php | |
// origin : https://gist.github.com/Skalman/801436d9693ff03bc4ce | |
if (!isset($_GET['url'])) { | |
?> | |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>Youtube RSS creator</title> | |
<form> | |
<p>Create an RSS feed for the videos on the following page: |
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
function getQueryString(name) { | |
location.href.replace("#", ""); | |
// 如果链接没有参数,或者链接中不存在我们要获取的参数,直接返回空 | |
if (location.href.indexOf("?") == -1 || location.href.indexOf(name + '=') == -1) { | |
return ''; | |
} | |
// 获取链接中参数部分 | |
var queryString = location.href.substring(location.href.indexOf("?") + 1); | |
// 分离参数对 ?key=value&key2=value2 | |
var parameters = queryString.split("&"); |