Skip to content

Instantly share code, notes, and snippets.

melice

Block or report user

Report or block melice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jenkins.install
centos下安装 jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
yum install jenkins
/usr/lib/jenkins/jenkins.war WAR包
@melice
melice / centos_java8.sh
Last active Jun 5, 2018
script for install java 8u171 for centos x64
View centos_java8.sh
# script for install java 8u171 for centos x64
# download
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.rpm"
# yum install
yum localinstall jdk-8u171-linux-x64.rpm
View cliboard.bat
#run this when RDP clipboard not working
taskkill -im rdpclip.exe -f
rdpclip.exe
@melice
melice / word2pdf.pas
Created Oct 16, 2017
office word docx save to pdf
View word2pdf.pas
program word2pdf;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.Variants,
System.Win.ComObj,
Word2000,
Vcl.OleServer;
const
@melice
melice / mobilepage.js
Last active Nov 23, 2016
mobile auto jump js
View mobilepage.js
<script>
(function(a,b){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kw
@melice
melice / getQueryString.js
Last active Oct 29, 2016
getQueryString
View getQueryString.js
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("&");
@melice
melice / youtube.php
Last active Aug 17, 2016
fetch youtube channel as RSS
View youtube.php
<?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:
@melice
melice / loadNprepare.php
Created Aug 12, 2016
php file_get_contents loadHTML 乱码
View loadNprepare.php
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;
View jenkins.stable.sh
#!/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
View jenkins.sh
#!/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
You can’t perform that action at this time.