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
for i in (luarocks path | awk '{sub(/PATH=/, "PATH ", $2); print "set -gx "$2}'); eval $i; end |
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 | |
## Main reference https://raymii.org/s/tutorials/IPSEC_vpn_with_CentOS_7.html | |
yum -y install epel-release | |
yum -y install haveged strongswan | |
/etc/init.d/haveged start | |
chkconfig haveged on | |
cd /etc/strongswan || exit | |
cat > strongswan.conf <<'EOF' |
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
//一个压缩小整数的算法,原文来自这里 | |
//http://mp.weixin.qq.com/s?__biz=MzA3MDExNzcyNA==&mid=2650392086&idx=1&sn=6a2ecfe2548f121a4726d03bf23f4478 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <unistd.h> | |
typedef unsigned char byte; | |
////http://stackoverflow.com/questions/111928/is-there-a-printf-converter-to-print-in-binary-format?page=1&tab=active#tab-top |
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
/** | |
* Created by [email protected] on 7/2/15. | |
*/ | |
(function(){ | |
"use strict"; | |
var Circles = function(e,op) { | |
this.options = $.extend({}, Circles.DEFAULTS, op); | |
this.$e = $(e); | |
this.$e.val(this.options.to); | |
this.$e.knob(this.options); |
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 | |
cd ~ | |
WGET_CMD=$(type -P wget) | |
if [ "X$WGET_CMD" = "X" ];then | |
yum -y install wget coreutils | |
fi | |
if [ ! -f ~/.dir_colors ]; then |
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 | |
ISINSTALLED_D=$(rpm -qa |grep dmidecode) | |
if [ -z $ISINSTALLED_D ]; then | |
yum -y install dmidecode | |
fi | |
export PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin |
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 | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 < filepath > [ \# | \; | \/\/ | \<other comment sign>, default: \# ]" | |
exit 1; | |
fi | |
CONFIG_FILE=$1 | |
if [ ! -f ${CONFIG_FILE} ]; then |
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
#if ! __has_feature(objc_arc) | |
#error This file must be compiled with ARC. | |
#endif | |
#TARGETS -> Build Settings -> Apple LLVM complier *.* Language -> Object-C Automatic Reference Counting -> YES/NO | |
#TARGETS -> Build Phases -> Complie Sources -> -fno-objc-arc/-fobjc-arc |
NewerOlder