Skip to content

Instantly share code, notes, and snippets.

@keedi
keedi / private.xml
Created August 31, 2018 07:23 — forked from yongbin/private.xml
mac osx 에서 바람 한글 입력기를 사용하며 Emacs 환경에서만 바람 입력기를 disable 하고 Emacs 자체 입력기를 호출하도록 하는 KeyRemap4MacBook 의 private.xml 설정.
<?xml version="1.0"?>
<root>
<appdef>
<appname>EMACS</appname>
<equal>org.gnu.Emacs</equal>
</appdef>
<item>
<name>emacs - friendly input method</name>
<identifier>private.emacs.friendly-input-method</identifier>
<only>EMACS</only>
@keedi
keedi / mojo-vue.pl
Created August 9, 2018 06:27 — forked from Tekki/mojo-vue.pl
Mojolicious - Vue.js Example
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/api/:region' => sub ($c) {
my %regions = (
#!/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):
@keedi
keedi / config
Created June 27, 2018 08:53 — forked from weynhamz/config
i3-wm configuration
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
#####
#
# Fonts
#
@keedi
keedi / curl.md
Created April 18, 2018 07:39 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@keedi
keedi / irc.md
Created April 2, 2018 03:01 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@keedi
keedi / README-reverse-proxy-in-haproxy.md
Last active January 18, 2018 02:30 — forked from drmalex07/README-reverse-proxy-in-haproxy.md
Perform simple reverse-proxying in HAProxy. #reverse-proxy #proxy #haproxy #proxypass

A more complete example (with rewriting cookie domains/paths) can be found at http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/

We will try something roughly equivalent to the following ProxyPass directives in Apache2:

ServerName www.example.com
...
ProxyPass        /foo/  http://foo.local
ProxyPassReverse /foo/  http://foo.local

In haproxy.cfg we define a backend, say foo, to reverse-proxy to foo.local backend server.

@keedi
keedi / valid.pl
Created January 10, 2018 08:58 — forked from brianmed/valid.pl
jQuery Mobile and Mojolicious Validation example
#!/opt/perl
use Mojolicious::Lite;
helper setup_valid => sub {
my $self = shift;
my $topics = shift;
my $v = $self->validation;
@keedi
keedi / upload.php
Created November 15, 2017 07:40 — forked from taterbase/upload.php
Simple file upload in php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
@keedi
keedi / linux_fun.md
Created October 30, 2017 06:10 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!