Skip to content

Instantly share code, notes, and snippets.

View saturngod's full-sized avatar
🎯
Focusing

Htain Lin Shwe saturngod

🎯
Focusing
View GitHub Profile
/**************************
* Html form with hidden data called csv_hdr and csv_output.
*********************************/
$(document).ready(function(){
$("#btn_challenge_score_details").click(function (){
var csv_hdr = $("#csv_hdr").val();
var csv_output = $("#csv_output").val();
var dataString = 'csv_hdr='+ csv_hdr + '&csv_output=' + csv_output;
//alert (dataString); return false;
#!/bin/sh
# if Xcode , need to install Command Line Tools From Xcode
# 初期設定
WORK=$HOME/Builds/build-essential
PREFIX=$HOME/local
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# check Build Dir Exist or not
if [ ! -d $HOME/Builds ] ; then
sudo /etc/init.d/xbmc stop #default password = 'raspberry'
sudo su #default password = 'raspberry'
echo "/opt/vc/lib" > /etc/ld.so.conf.d/00-vmcs.conf
ldconfig
sudo chown xbian:xbian .xbmc/userdata/sources.xml
sed -i 's/gpu_mem_256=100/gpu_mem_256=128/g' /boot/config.txt
sed -i 's/gpu_mem_512=100/gpu_mem_512=128/g' /boot/config.txt
@saturngod
saturngod / BunnyVOD.php
Last active March 22, 2023 21:08 — forked from ToshY/BunnyVOD.php
BunnyCDN VOD HLS Token Authentication V2 with directory tokens
<?php
function sign_bcdn_url($url, $securityKey, $expiration_time = 3600, $user_ip = NULL, $is_directory_token = false, $path_allowed = NULL, $countries_allowed = NULL, $countries_blocked = NULL)
{
if(!is_null($countries_allowed))
{
$url .= (parse_url($url, PHP_URL_QUERY) == "") ? "?" : "&";
$url .= "token_countries={$countries_allowed}";
}
if(!is_null($countries_blocked))