Skip to content

Instantly share code, notes, and snippets.

@sekimura
sekimura / simple chat server by using AnyEvent
Created July 22, 2009 07:50
simple chat server by using AnyEvent
#!/usr/bin/perl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::Socket qw/tcp_server/;
use AnyEvent::Handle;
my %conns;
#!/usr/bin/perl
use warnings;
use strict;
use Encode qw(encode decode);
my ($code) = @ARGV;
print encode('UTF-8', chr hex $code);
#!/usr/bin/perl -t
use warnings;
use strict;
my ($regex_string) = @ARGV;
my $regex = qr/$regex_string/i;
while (<DATA>) {
my ($name, $code) = split "\t";
next if $name =~ /^\[[A-Z]\]$/;
@napcs
napcs / .vimrc
Last active December 14, 2022 17:40
Set up Vim on Mac, Linux, or Windows. For Mac and Linux: sh <(curl -s https://gist.githubusercontent.com/napcs/532968/raw/vim.sh)
if has('win32') || has ('win64')
let $VIMHOME = $HOME."/Dropbox/dotfiles/.vim"
if !empty($CONEMUBUILD)
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
endif
# vim: ft=perl:
use strict;
use warnings;
use Plack::Builder;
use Plack::App::WrapCGI;
use Plack::App::URLMap;
builder {
enable 'Static',
;; minimalist emacs configuration
;; for korean emacs starter
;; language setting
(setq default-input-method "korean-hangul")
(global-set-key (kbd "<Hangul>") 'toggle-input-method)
;; font setting
(set-default-font "Consolas-10")
(set-fontset-font t '(#x1100 . #xffdc) '("Malgun Gothic" . "unicode-bmp"))

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@balupton
balupton / README.md
Last active July 13, 2024 17:32
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@aanoaa
aanoaa / post-commit
Created March 12, 2011 04:44
aplay random sounds
We couldn’t find that file to show.
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk # sets app name
import gnomekeyring
def hack():
for keyring in gnomekeyring.list_keyring_names_sync():
for id in gnomekeyring.list_item_ids_sync(keyring):