Skip to content

Instantly share code, notes, and snippets.

Jethro Yu jcppkkk

  • Taipei
Block or report user

Report or block jcppkkk

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
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active Aug 23, 2019 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
View OpenWithSublime.bat
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
@jcppkkk
jcppkkk / install.bat
Created Jan 8, 2014
robotframework/robotframework-ride installer for windows 64bit
View install.bat
@echo off
call :check_Permissions
pushd %temp%
@echo.===================================================================
@echo.install python-2.7.6.amd64
call :download "http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi" "python-2.7.6.amd64.msi"
python-2.7.6.amd64.msi /passive
call :download "http://www.rapidee.com/download/RapidEE_setup.exe" "RapidEE_setup.exe"
RapidEE_setup.exe /SILENT
View change-host-name.sh
#!/bin/bash
old=`hostname`
new="$1"
read -p "Change hostname from \"$old\" to \"$new\"? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo true
set -v
View prepare-ubuntu-template.sh
#!/bin/bash
id
if [ `id -u` -ne 0 ]; then
echo Need sudo
exit 1
fi
set -v
#add VMware package keys
wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub -O - | apt-key add -
@jcppkkk
jcppkkk / cuckoo-api
Last active Jun 14, 2018
cuckoo supervisord.conf (cuckoo-service, process, rooter, web, api)
View cuckoo-api
upstream _uwsgi_cuckoo_api {
server unix:/home/ubuntu/.cuckoo/cuckoo-api.socket;
}
server {
listen 8090;
# REST API app
location / {
client_max_body_size 1G;
@jcppkkk
jcppkkk / # node - 2018-04-17_15-53-52.txt
Created Apr 17, 2018
node on macOS 10.12.6 - Homebrew build logs
View # node - 2018-04-17_15-53-52.txt
Homebrew build logs for node on macOS 10.12.6
Build date: 2018-04-17 15:53:52
@jcppkkk
jcppkkk / .block
Last active Dec 13, 2017 — forked from mbostock/.block
Nested Treemap
View .block
license: gpl-3.0
height: 720
@jcppkkk
jcppkkk / README.md
Created Feb 21, 2017 — forked from trinitronx/README.md
A shell script to install latest Ansible via pip + dependencies
View README.md

omnibus-ansible

Install latest Ansible via pip + dependencies via a shell script

This file is used to install ansible in test kitchen when you set in the kitchen.yaml file

require_ansible_omnibus: true

By default test kitchen will always download and use the latest version of this install file.

WARNING: AS SOON AS YOU MERGE CODE HERE IT IS INSTANTLY AVAILABLE TO EVERYONE DOING OMNIBUS KITCHEN ANSIBLE INSTALLS:

@jcppkkk
jcppkkk / gist:4149704
Created Nov 26, 2012
Boyer-Moore algorithm
View gist:4149704
#define MAX(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
#include <stdio.h>
#include <string.h>
#define XSIZE 20
#define ASIZE 256
@jcppkkk
jcppkkk / gist:f09b508b65943bdca00c
Last active Feb 21, 2016
Setting up a Jenkins slave on Linux
View gist:f09b508b65943bdca00c
# On slave
adduser --system --group --home=/var/lib/jenkins --no-create-home --disabled-password --quiet --shell /bin/bash jenkins
install -d -o jenkins -g jenkins /var/lib/jenkins
install -d -m 700 -o jenkins -g jenkins /var/lib/jenkins/.ssh
apt-get install -y openjdk-7-jre-headless git-core nfs-common
cat > /etc/cron.hourly/ntpdate <<EOF
#!/bin/bash
ntpdate 172.16.11.254
EOF
You can’t perform that action at this time.