Skip to content

Instantly share code, notes, and snippets.

#!/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
#!/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
@melice
melice / playstream.pas
Created November 11, 2015 04:09
play a stream media
uses
iOSapi.Foundation, iOSapi.MediaPlayer, FMX.Platform.iOS;
Type
TForm1 = Class( TForm )
Procedure FormCreate( Sender: TObject );
Private
<?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)
{
unit ListviewHelper;
interface
uses System.SysUtils, Vcl.ComCtrls;
type
TListviewHelper = class helper for TListview
public
procedure SetRowCount(Count: Integer; Compacted: Boolean = False);
@melice
melice / auto_iptables.sh
Last active August 29, 2015 14:14
配置iptables脚本
#!/bin/bash
#########################################
#Function: auto_iptables
#Usage: bash auto_iptables.sh
#Author: melice
#Version: 1.0
#Origin: vpser.net
# for ubuntu only
#########################################
@melice
melice / install_nginx.sh
Last active July 15, 2016 08:18
nginx 预编译版本安装脚本 ubuntu 14.04
#/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
@melice
melice / auto_fdisk.sh
Created January 30, 2015 07:26
阿里云自动挂载分区脚本
#/bin/bash
#########################################
#Function: auto fdisk
#Usage: bash auto_fdisk.sh
#Author: Customer service department
#Company: Alibaba Cloud Computing
#Version: 3.0
#########################################
count=0
package com.ifreestudio.olympic.servlet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
procedure TfrmMain.DomImg2Image(wb:TWebBrowser);
var
i:Integer;
rang:IHTMLControlRange;
s:string;
begin
try
s := (IHTMLDocument2(wb.Document).images.item('pic',EmptyParam) as IHTMLElement).getAttribute('src',0);
rang:=((IHTMLDocument2(wb.Document).body as HTMLBody).createControlRange)as
IHTMLControlRange;