Skip to content

Instantly share code, notes, and snippets.

View adaam's full-sized avatar
😍
Beautiful World

Adam Chen adaam

😍
Beautiful World
  • Knowtions research
  • Taipei, Taiwan
View GitHub Profile
@adaam
adaam / elasticmonitor.py
Created December 19, 2014 07:19
feed each machine in elasticsearch cluster status to cacti
#!/usr/bin/env python
# Script to seprate host data send to cacti
# adaam 2014.07.15
import urllib2
import simplejson
import getopt
import os, sys, datetime, re
@adaam
adaam / test.cpp
Created January 12, 2015 07:41
demo c++ class
#include<iostream>
using namespace std;
class a {
public:
int getb(void){ return b;};
private:
static const int b = 10;
};
int main(void){
a *p=new a();
@adaam
adaam / rebrand.sh
Created April 28, 2015 10:02
use for ipa file resign
#!/bin/sh
. config.sh
# variables
SourceFile=""
DestFile=""
Version="1.1.0"
IsAppStore=0
function Print_Usage()
@adaam
adaam / Entitlements.plist
Created April 28, 2015 10:10
use for ipa file resign Entitlements.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>SET_YOUR_APPLE_ID</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
@adaam
adaam / config.sh
Created April 28, 2015 10:10
use for ipa file resign config
#!/bin/sh
# (Information)
# - PROVISIONING PROFILE PATH:
# FOR EXAMPLE /Users/YOURNAME/Library/MobileDevice/Provisioning Profiles/PROVISIONINGPROFILE.mobileprovision
ProvProfile="YOUR_DOWNLOAD_PATH_OF_ANY.mobileprovision"
# - YOUR DISTROBUTION CERT NAME HERE FROM KEYCHAIN
SigningCertName="SET_YOUR_CERT_NAME"
ubuntu@ip-172-31-7-87:~/chef-repo/d2b2_website$ kitchen converge
-----> Starting Kitchen (v1.7.3)
-----> Converging <default-centos-7>...
$$$$$$ Running legacy converge for 'Docker' Driver
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.2...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: ["\xE2" on US-ASCII]
adaamM:usermanage adaam$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = '2'
Vagrant.require_version '>= 1.5.0'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@adaam
adaam / nfs_stat.sh
Created November 1, 2016 09:42
Parse "nfsstat -l" file to time serial, for gnuplot using
#!/bin/sh
while true
do
D=$(date +%s)
nfsstat -l > /home/XXX_USER/nfsstat_log/$D
sleep 5
done
@adaam
adaam / promethous-configmap.yaml
Created November 3, 2016 09:44
k8s 1.2 with promethous 0.19.2 with configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
data:
prometheus.yml: |-
global:
scrape_interval: 15s
scrape_configs:
# etcd is living outside of our cluster and we configure
@adaam
adaam / keybase.md
Last active February 3, 2017 08:16
keybase.md

Keybase proof

I hereby claim:

  • I am adaam on github.
  • I am cadaam (https://keybase.io/cadaam) on keybase.
  • I have a public key ASBYlCMx-GBr9WSpltLY6Xqu6koUVTk-07bJvT-QaARwUAo

To claim this, I am signing this object: