Skip to content

Instantly share code, notes, and snippets.

@seungwon0
seungwon0 / bytes
Last active January 27, 2016 07:51
prints the input number as byte, KiB, MiB and GiB unit
#!/usr/bin/env perl
#
# bytes - prints the input number as byte, KiB, MiB and GiB unit
#
# Prints the input number as byte, KiB, MiB and GiB unit.
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright (C) 2016 by Seungwon Jeong
#
@seungwon0
seungwon0 / 한글.pl
Last active February 10, 2018 19:35
한글 초성, 중성, 종성 분해 및 결합
#!/usr/bin/env perl
#
# 한글.pl - 한글 초성, 중성, 종성 분해 및 결합
#
# 초성, 중성, 종성을 결하여 글자를 만들거나, 글자를 초성, 중성,
# 종성으로 분해합니다.
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright (C) 2015 by Seungwon Jeong
@seungwon0
seungwon0 / usb-lookup.pl
Last active January 27, 2016 07:51
looks up USB ID information
#!/usr/bin/env perl
#
# usb-lookup.pl - looks up USB ID information
#
# Looks up USB ID information from http://www.linux-usb.org/usb.ids.
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright (C) 2014 by Seungwon Jeong
#
@seungwon0
seungwon0 / garp.c
Last active February 8, 2024 05:10
Send IPv4 Gratuitous ARP Packet
/* garp.c - Send IPv4 Gratuitous ARP Packet
Usage Example: sudo ./garp eth0
Copyright (C) 2011-2013 P.D. Buchan (pdbuchan@yahoo.com)
Copyright (C) 2013 Seungwon Jeong (seungwon0@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@seungwon0
seungwon0 / makefile-graphviz.pl
Created April 29, 2013 08:36
draws a building flowchart from makefile
#!/usr/bin/env perl
#
# makefile-graphviz.pl - draws a building flowchart from makefile
#
# Draws a buildidng flowchart from makefile using Makefile::GraphViz.
#
# Usage Example:
# % ./makefile-graphviz.pl Makefile Makefile.png
#
# Seungwon Jeong <seungwon0@gmail.com>
@seungwon0
seungwon0 / facebook-feed.pl
Last active December 16, 2015 18:39
shows facebook feed URL
#!/usr/bin/env perl
#
# facebook-feed.pl - shows facebook feed URL
#
# Shows facebook feed URL.
#
# Usage examples:
# % ./facebook-feed.pl girlsgeneration
# http://www.facebook.com/feeds/page.php?format=atom10&id=216732611680045
# % ./facebook-feed.pl http://www.facebook.com/trycatchpage
@seungwon0
seungwon0 / get-input-output.pl
Last active December 15, 2015 02:09
downloads sample input/output data from acmicpc.net
#!/usr/bin/env perl
#
# get-input-output.pl - downloads sample input/output data from acmicpc.net
#
# Downloads sample input/output data from Baekjoon Online Judge (acmicpc.net).
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright (C) 2013 by Seungwon Jeong
#
@seungwon0
seungwon0 / circle.py
Created December 14, 2012 09:18
draws circle using ASCII characters
#!/usr/bin/env python
#
# circle.py - draws circle using ASCII characters
#
# http://kldp.org/node/135436
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright (C) 2012 by Seungwon Jeong
#
@seungwon0
seungwon0 / byteorder.c
Created November 5, 2012 07:43
Detect byte order (little/big endian)
#include <stdio.h>
int main(void)
{
const int data = 1;
const char *const ptr = (char *)&data;
if (*ptr == 1)
puts("Little Endian");
else if (*ptr == 0)
@seungwon0
seungwon0 / wifi_scanner.pl
Created October 30, 2012 11:14
Get number of APs for each WLAN channel
use strict;
use warnings;
use Android;
my $android = Android->new;
my $scan_results_ref = $android->wifiGetScanResults;