Skip to content

Instantly share code, notes, and snippets.

Avatar

Heri Sim heri16

View GitHub Profile
@heri16
heri16 / syncthing-service.xml
Created Oct 27, 2014
Syncthing Service Configuration File
View syncthing-service.xml
<service>
<id>syncthing</id>
<name>Syncthing</name>
<description>Syncthing</description>
<executable>D:\syncthing\syncthing.exe</executable>
<logpath>D:\syncthing\log</logpath>
<logmode>roll</logmode>
<depend></depend>
<argument>-home D:\syncthing\data</argument>
<argument>-logfile D:\syncthing\log\syncthing.log</argument>
@heri16
heri16 / syncthing-service.exe.config
Created Oct 27, 2014
Syncthing Service Runtime Config for .NET v4.0
View syncthing-service.exe.config
<configuration>
<startup>
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0" />
</startup>
</configuration>
@heri16
heri16 / syncthing-service.cmd
Created Oct 27, 2014
Syncthing Service Install/Uninstall Script
View syncthing-service.cmd
syncthing-service.exe uninstall
syncthing-service.exe install
pause
@heri16
heri16 / IRremoteInt.h
Created May 21, 2015
Arduino IRremote Library for LightBlue Bean
View IRremoteInt.h
/*
* IRremote
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
*
* Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
*
* Interrupt code based on NECIRrcv by Joe Knapp
* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
@heri16
heri16 / IRremote.h
Created May 21, 2015
Arduino IRremote Library for LightBlue Bean
View IRremote.h
/*
* IRremote
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.htm http://arcfn.com
* Edited by Mitra to add new controller SANYO
*
* Interrupt code based on NECIRrcv by Joe Knapp
* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
* Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
@heri16
heri16 / IRremote.cpp
Created May 21, 2015
Arduino IRremote Library for LightBlue Bean
View IRremote.cpp
/*
* IRremote
* Version 0.11 August, 2009
* Copyright 2009 Ken Shirriff
* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
*
* Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
* Modified by Mitra Ardron <mitra@mitra.biz>
* Added Sanyo and Mitsubishi controllers
* Modified Sony to spot the repeat codes that some Sony's send
View ECS-LaunchConfig-User-Data
#!/bin/bash
echo ECS_CLUSTER=default >> /etc/ecs/ecs.config
yum update -y curl tar
rm -rf /opt/netflix-proxy/
curl -L https://github.com/ab77/netflix-proxy/archive/master.tar.gz | tar xz --directory /opt/ && mv /opt/netflix-proxy-master /opt/netflix-proxy
curl -Lo /opt/netflix-proxy/build.sh https://gist.github.com/heri16/e68357298869618e7871/raw/build.sh
curl -Lo /var/lib/cloud/scripts/per-boot/netflix-proxy-data.sh https://gist.github.com/heri16/e68357298869618e7871/raw/netflix-proxy-data.sh
chmod +x /var/lib/cloud/scripts/per-boot/netflix-proxy-data.sh
@heri16
heri16 / bgpd.conf
Last active Feb 14, 2022
AWS VPC VPN StrongSwan Virtual Tunnel Interface (VTI)
View bgpd.conf
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu)
hostname <Local OS hostname>
password <Any random phrase>
enable password <Any random phrase>
!
log file /var/log/quagga/bgpd
!debug bgp events
!debug bgp zebra
debug bgp updates
@heri16
heri16 / 1-EnableWinRM.ps1
Last active Jan 27, 2016
SoftwareUpgradeNasional
View 1-EnableWinRM.ps1
# 0. Hanya untuk Win7, buka "Network and Sharing Center", dan pastikan semua koneksi tipe nya sudah di set ke "Work/Home" bukan Public.
# 1. Masuk ke Powershell Administrator.
# 2. Pilih sebuah password yang minim ada huruf besar dan simbol, dan edit di bagian $password
# 4. Copy-Paste seluruh script ini ke dalam Powershell Administrator.
# Pilih sebuah password yang minim ada huruf besar dan simbol, dan edit variable tersebut (sebelum di execute di shell):
$password = 'P@sswordPilihanNyaCabangMasing2'
clear
View fizzbuzz.ex
defmodule Fizzbuzz do
def fizzbuzz_case(num) do
case num do
num when rem(num, 15) == 0 -> "FizzBuzz"
num when rem(num, 5) == 0 -> "Buzz"
num when rem(num, 3) == 0 -> "Fizz"
num -> num
end
end