Skip to content

Instantly share code, notes, and snippets.

@nicklockwood
nicklockwood / ARCHelper.h
Last active November 20, 2018 10:02
ARC Helper
//
// ARC Helper
//
// Version 2.2
//
// Created by Nick Lockwood on 05/01/2012.
// Copyright 2012 Charcoal Design
//
// Distributed under the permissive zlib license
// Get the latest version from here:
@jackyueq
jackyueq / gist:5007572
Created February 21, 2013 19:49
Add utf-8 support to synology dsm
http://www.xn--brwolff-5wa.de/tech-notes/synology-diskstation-howto-set-locale.txt
I've been using a Synology Diskstation DS209j to backup data via rsync. However, the locale on my laptop (the source of the backups) is de_DE.utf8, and on the Diskstation no such locale (in fact, no utf-8 locale at all) is available by default. This becomes a problem as soon as you're dealing with file names containing "non-standard" characters such as German umlauts. Here's what I did to remedy the problem, largely based on a very useful howto at <http://forum.synology.com/wiki/index.php/CrashPlan_Headless_Client>:
log in to the Diskstation as root
cd /volume1/@tmp
uname -a # in order to find out what system you're at, and which tool chain to download from http://sourceforge.net/projects/dsgpl/files/; mine was <http://sourceforge.net/projects/dsgpl/files/DSM%203.2%20Tool%20Chains/Marvell%2088F628x%20Linux%202.6.32/gcc421_glibc25_88f6281-GPL.tgz/download>
wget $the_url_found_in the_previous_step
tar -xzvf $the_file_thus_down
@probonopd
probonopd / ardmonitor.py
Created March 1, 2014 21:03
Python Arduino Monitor
#! /usr/bin/env python
# Read the output of an Arduino which may be printing sensor output,
# and at the same time, monitor the user's input and send it to the Arduino.
# See also
# http://www.arcfn.com/2009/06/arduino-sheevaplug-cool-hardware.html
import sys, serial, select
class Arduino() :
@probonopd
probonopd / Arduino Yun (Linino) on OpenWrt
Last active December 21, 2021 06:28
Install Arduino Yun (Linino) software on OpenWrt on 3rd-party devices. TODO: Fully automate install and/or use Linino rootfs image and/or build own firmware using OpenWrt Image Generator. CAVEATS: I have not yet found out how to make the Bridge use Serial (USB) instead of Serial1 (HardwareSerial) for the Leonardo. I have asked a question about t…
opkg install luci-lib-json luci rng-tools usbutils avrdude avahi-daemon
# If rng-tools is not installable, then install it by hand from e.g., http://download.linino.org/linino_distro/linino_dev/latest/packages/rng-tools_3-2_ar71xx.ipk
# Edit your /etc/opkg.conf, add
src/gz barrier_breaker http://download.linino.org/dogstick/all-in-one/latest/packages/
# Comment out your earlier src/gz
opkg update
opkg list|grep bridge
@wavezhang
wavezhang / java_download.sh
Last active April 28, 2025 14:45
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@quazzie
quazzie / ifan02.h
Last active September 2, 2024 07:18
esphome ifan02 cookbook info
#include "esphome.h"
using namespace esphome;
class IFan02Output : public Component, public FloatOutput {
public:
void write_state(float state) override {
if (state < 0.3) {
// OFF
digitalWrite(5, LOW);
digitalWrite(4, LOW);