Skip to content

Instantly share code, notes, and snippets.

View danny-source's full-sized avatar

DannySTW danny-source

View GitHub Profile
@danny-source
danny-source / generate-ssh-key.sh
Created February 24, 2019 12:26 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@danny-source
danny-source / bash.generate.random.alphanumeric.string.sh
Last active July 26, 2018 07:24 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash 亂數產生 數字、大小寫字母
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@danny-source
danny-source / syno_ddns_nsupdate.pl
Last active July 12, 2018 02:08 — forked from nall/syno_ddns_nsupdate.pl
群暉支援NSUpdate 更新DDNS-Crontab script for Synology boxes. Updaes a DNS BIND server when hostname or WAN IP changes.Requires the Synology DNSServer package to be installed (but doesn't need to be running).
#!/opt/bin/perl
use warnings;
use strict;
# Copyright (c) 2013 Jon Nall, STUNTAZ!!! All rights reserved.
#
# This script is intended to be run on a Synology NAS. It attempts
# to determine the external IP where the NAS is connected and then
# checks to see if it needs to update a DNS record. The server is
# updated if any of these are true:

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@danny-source
danny-source / gist:c6e3820f846d8672bcc91978a57b265d
Created April 7, 2016 16:02 — forked from eternnoir/gist:7556322
wine方塊字,使用Droid Font
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink]
"FontLinkControl"=dword:00004000
"FontLinkDefaultChar"=dword:00003000
/* 平滑化(anti-alias) */
/* 如果覺得開了之後字體難看,把三個Y改成N */
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideAntiAliasWithCore"="Y"
"ClientSideAntiAliasWithRender"="Y"
"ClientSideWithRender"="Y"