Skip to content

Instantly share code, notes, and snippets.

View adongy's full-sized avatar
🚧

Anthony Dong adongy

🚧
  • France
View GitHub Profile
@adongy
adongy / dummy0.netdev
Created July 24, 2020 14:12 — forked from kquinsland/dummy0.netdev
How to get consul-agent and systemd.resolvd to co-exist peicefully and still be able to resolve *.consul hostsnames from within docker
# Creates a "dummy" network interface
# we'll configure this interface with a link-local address
# See: https://www.freedesktop.org/software/systemd/man/systemd.netdev.html
##
[NetDev]
Name=dummy0
Kind=dummy

Keybase proof

I hereby claim:

  • I am adongy on github.
  • I am adongy (https://keybase.io/adongy) on keybase.
  • I have a public key ASDDqmt9FE2yknI88Vl8cWm_NxT1wwYfszYdKzNR1W_mpwo

To claim this, I am signing this object:

@adongy
adongy / boxstarter.ps1
Last active October 10, 2017 08:12 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@adongy
adongy / .block
Created February 14, 2017 16:19 — forked from mbostock/.block
Save SVG as PNG
license: gpl-3.0
; KeypressOSD.ahk
;----------------------------------------------------------
; ChangeLog : v2.06 (2016-11-23) - Added more keys. Thanks to SashaChernykh.
; v2.05 (2016-10-01) - Fixed not detecting "Ctrl + ScrollLock/NumLock/Pause". Thanks to lexikos.
; v2.04 (2016-10-01) - Added NumpadDot and AppsKey
; v2.03 (2016-09-17) - Added displaying "Double-Click" of the left mouse button.
; v2.02 (2016-09-16) - Added displaying mouse button, and 3 settings (ShowMouseButton, FontSize, GuiHeight)
; v2.01 (2016-09-11) - Display non english keyboard layout characters when combine with modifer keys.
; v2.00 (2016-09-01) - Removed the "Fade out" effect because of its buggy.
; - Added support for non english keyboard layout.
@adongy
adongy / index.html
Last active March 10, 2016 17:57 — forked from MatthewRDodds/a.html
Uncaught Error: invalid version specified
<html>
<head>
<title>Your Website Title</title>
<!-- You can use open graph tags to customize link previews.
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
<meta property="og:url" content="http://www.your-domain.com/your-page.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="http://www.your-domain.com/path/image.jpg" />
@adongy
adongy / index.html
Created December 13, 2014 19:22
sortable example
<!DOCTYPE html>
<html>
<body>
<form id="form" action="">
<div style="width:50%; margin: 0 auto;">
<div style="width:50%; float: left;">
<div>
List A
</div>
<ol id="foo" style="padding: 5px 1em;">
/**
* igmp-querier.c - IGMP Querier for Multicast DNS
*
* Copyright (c) 2014, Anthony Dong <aanthony.dong@gmail.com>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*
* Original work by Daniel Lorch <dlorch@gmail.com>
require('chdkptp')
require('lfs')
require('lbuf')
require('rawimg')
require('io')
require('os')
util=require('util')
util:import()
ustime=require('ustime')
fsutil=require('fsutil')
# -*- coding: utf-8 -*-
import logging
import os
import tempfile
import time
from fractions import Fraction
import usb
from jpegtran import JPEGImage
from spreads.vendor.pathlib import Path