Skip to content

Instantly share code, notes, and snippets.

@librehat
librehat / testcdb2api_datetime.c
Created May 30, 2018 16:49
Bind datetime param
#include <cdb2api.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <time.h>
void print_datetime(const cdb2_client_datetime_t* src)
{
::This batch will run shadowsocks-libqss in server mode using the config.json file in current folder as the configuration
@echo off
::this script is updated for version 1.7.0
shadowsocks-libqss.exe -c config.json -S
@librehat
librehat / setcpu.sh
Created February 10, 2015 23:07
A script for setting CPU frequency that I mainly use for my odroid-u3
#!/bin/bash
# change cpu frequency
max_cap=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
min_cap=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
# lowest ~ 1.71GHz by default
max_freq=1710000
min_freq=$min_cap
@librehat
librehat / com.librehat.yahooweather.pot
Created March 20, 2014 02:37
Translation File for Yahoo! Weather Widget.
# plasma-applet-yahooweather language translation file.
# Copyright (C) 2014 William Wong
# This file is distributed under the same license as the plasma-applet-yahooweather package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.3\n"
"Report-Msgid-Bugs-To: \n"
@librehat
librehat / Rakefile
Created September 26, 2013 05:56
Rakefile for Octopress 2.5 deployment on OpenShift. You NEED TO modify some parameters to satify your specific situation.
require "rubygems"
## require "bundler/setup" ##
# This would mess up envrionment variables and end up load errors. See http://warewolf.github.io/blog/2013/04/28/adventures-in-ruby/ #
require "stringex"
require "guard"
require "guard/cli"
## -- Rsync Deploy config -- ##
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
ssh_user = "user@domain.com"