Skip to content

Instantly share code, notes, and snippets.

@juvenn
juvenn / install.sh
Last active November 19, 2022 22:15
Home Assistant Supervisor on Coreelec 19.x
#!/usr/bin/env bash
set -e
function error { echo -e "[Error] $*"; exit 1; }
function warn { echo -e "[Warning] $*"; }
ARCH=$(uname -m)
DOCKER_BINARY=/usr/bin/docker
DOCKER_REPO=homeassistant
DOCKER_SERVICE=docker.service

Keybase proof

I hereby claim:

  • I am juvenn on github.
  • I am juvenn (https://keybase.io/juvenn) on keybase.
  • I have a public key ASA0s8UyFPO-LxqnqEZtkJz5q2mk-1Ro_I4dDves4vtatwo

To claim this, I am signing this object:

Hello PHP!

PHP 作为 Web 平台曾经部署最为广泛的语言,其易于部署的特性使它赢得了广 大开发者的支持。今天我们很高兴地发布基于 PHP 的 LeanCloud SDK,0.1.0 版,方便 PHP 开发者能够第一时间测试使用,并为我们提供意见和建议。

0.1.0 版本主要支持数据存储,包括用户的管理,对象的存储查询,以及文件存 储,可以在 PHP 5.3 及以上的运行环境中使用。部署到 LeanEngine 的功能将 在后续版本中支持。

@juvenn
juvenn / Vagrantfile
Created July 29, 2013 13:46
vagrantfile mmic
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64a"
@juvenn
juvenn / qgis cmake
Created July 12, 2013 08:06
building qgis with homebrew
==> cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/qgis/1.8.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DQWT_INCLUDE_DIR=/usr/local/opt/qwt/lib/qwt.framework/Headers/ -DQWT_LIBRARY=/usr/local/opt/qwt/lib/qwt.framework/qwt -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DENABLE_TESTS=NO -DQGIS_MACAPP_BUNDLE=0 -DQGIS_MACAPP_DEV_PREFIX='/usr/local/Cellar/qgis/1.8.0/Frameworks' -DQGIS_MACAPP_INSTALL_DEV=YES -DPYTHON_INCLUDE_DIR='/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Headers' -DPYTHON_LIBRARY='/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib' -DPYTHON_EXECUTABLE='/usr/local/bin/python'
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/qgis/1.8.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DQWT_INCLUDE_DIR=/usr/local/opt/qwt/lib/qwt.framework/Headers/ -DQWT_LIBRARY=/usr/local/opt/qwt/lib/qwt.framework/qwt -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DENABLE_TESTS=NO -DQGIS_MACAPP_BUNDLE=0
@juvenn
juvenn / aes3500.diff
Created April 24, 2011 04:19
AES3500 driver for libfprint, with sniffed log of the windows driver
diff --git a/configure.ac b/configure.ac
index f5c26f9..b29764d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_SUBST(lt_major)
AC_SUBST(lt_revision)
AC_SUBST(lt_age)
-all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes2501 aes4000 vfs101"
+all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes2501 aes4000 aes3500 vfs101"
@juvenn
juvenn / getPreload.php
Created February 16, 2011 12:53
getPreload.php
function getPreload($field, $table, $id = "", $database = "", $syid = 1){
global $survey, $config;
if ($id == ""){
$id = $survey->primaryKey;
}
if ($config->getDataKey() != ""){
$answertext = "AES_DECRYPT(answertext, '" . $config->getDataKey() . "') as answertext_dec";
}
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
node> redis.set("greeting", "Thank you, Brain, for building us redis-node-client")
node> redis.get("greeting", function(err, reply) { sys.puts(reply); })
node> Thank you, Brain, for building us redis-node-client
redis.get("greeting", function(err, reply) { sys.puts(typeof(reply)); })
node> object // oops, it's an object instead of string
redis.get("greeting", function(err, reply) { sys.puts(sys.inspect(reply)); })
" File: commonjs-package-json
" Author: Ash Berlin <ash.berlin@gmail.com>
" Last Change: 23-Feb-2010.
" Version: 1.1
" Usage:
"
" Use by placing something like the following in your .vimrc:
"
" let g:maintainer='{ "name": "Ash Berlin", "web": "http://ashberlin.com" }'
"