Skip to content

Instantly share code, notes, and snippets.

@githubutilities
githubutilities / README.md
Last active January 31, 2023 10:09
Avahi build error log on Mac OS X Mavericks

According to wikipedia, Avahi is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS/DNS-SD service discovery.

  1. build dependent libs, refer to avahi download page
  • gettext
    brew link --force gettext
    brew unlink gettext
  • intltool
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:15
convert gif file to mp4

I got a gif file from google homepage but I want to convert it to more general mp4 file in order to share through wechat, but most of the solution I found on the internet suggest that I should combile imagemagick and ffmpeg to accomplish this. Here it's the interesting fact that most of the scripts does not work on mac os x mavericks.

Here is the solution I got:

ffmpeg -i lunar-new-year-2015-5753824463552512-hp.gif -pix_fmt yuv420p out.mp4

This command also proves useful, it can split gif file to pngs

@githubutilities
githubutilities / README.md
Created February 20, 2015 06:30
VPN on demand for iOS devices
@githubutilities
githubutilities / README.md
Last active February 11, 2019 19:21
Optical Character Recognition

Here is a list of OCR software:

  1. Ocrad

This also gets a JS version, but same as Ocrad, the result is not promising.

  1. GOCR

It got better result than Ocrad and 'so-called' more format support. You can use imagemagick to convert images to supported format

  1. tesseract
@githubutilities
githubutilities / README.md
Created March 3, 2015 01:06
My idea on notification center

Notification center is an alert system to deal with push and local notification for iOS5 or later and OSX 10.8 or later. I think it is an amazing feature for apple device but as the number of your installed app grown, your notification center may fill with noice and the notified feature may less likely hit the important thing. And here is some tricks that I use to reduce the noices:

  • pay attention to your notification center and mark the noicy app then go to setting > notificafion center to mute or change that app

Some improvement ideas:

  • notification should be smart enough to tell the important messages and notify users with differrence sound length
  • for apple device users should have more option on setting the notificafion center to optimize this feature
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:16
Windows Package Manager

Windows Package Manager

Using Scoop

Scoop is Homebrew alternative for windows.

# command prompt theme
scoop install concfg
concfg import solarized small
@githubutilities
githubutilities / README.md
Created March 5, 2015 13:06
Some Javascript Hacks

Show hidden password

Type javascript:alert(document.getElementById('password').value) into address bar or run document.getElementById('password').value in developer console, you will get the password.

Make any webpage editable

document.body.contentEditable='true'; document.designMode='on';
@githubutilities
githubutilities / README.md
Created March 5, 2015 14:08
Remove Image Metadata
@githubutilities
githubutilities / README.md
Created March 6, 2015 11:39
Interesting TCP three way handshake

Interesting TCP three way handshake

It's not hard to find out when we communicate using Instant Message Tools, we often apply TCP three way handshake for important messages. I send a important message(appended with if you receive this message, please reply) to you, and I am so paranoid that I need your reply or I will constantly send you that message until you reply. When I get your reply and maybe you are paranoid as I am, you may need me to comfirm that I have received your reply.

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"