This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from datetime import datetime | |
import errno | |
from fcntl import fcntl, F_SETFL | |
import logging | |
import os | |
from select import select | |
from signal import signal, SIGQUIT, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGHUP | |
from signal import SIGCHLD, SIG_DFL, SIGKILL | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: binary -*- | |
require 'sequel' | |
require 'sqlite3' | |
Bundler.require(:default, :development) | |
DB = Sequel.connect("sqlite:///tmp/test.db") | |
# DB.create_table(:users) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example | |
# . | |
# |-- about.md | |
# |-- _config.yml | |
# |-- css | |
# | `-- main.css | |
# |-- feed.xml | |
# |-- .gitignore | |
# |-- _includes | |
# | |-- footer.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /EFI/refind/refind.conf | |
# gives you chance to change choice, manually | |
timeout 5 | |
# tools for debuging, reboot without pushing damn button | |
showtools shell,reboot,exit | |
# scan internal disks, extenal(USB?) disks, | |
# optical drivers, and specify by following |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
from multiprocessing import Process | |
from time import sleep | |
import tkinter as tk | |
class Application(tk.Frame): | |
def __init__(self, master=None): | |
tk.Frame.__init__(self, master) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb | |
index a2629c5..020220e 100644 | |
--- a/app/controllers/groups_controller.rb | |
+++ b/app/controllers/groups_controller.rb | |
@@ -4,7 +4,7 @@ class GroupsController < ApplicationController | |
before_filter :group, except: [:new, :create] | |
# Authorize | |
- before_filter :authorize_read_group!, except: [:new, :create] | |
+ before_filter :authorize_read_group!, except: [:new, :create, :index] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# using logging module | |
# | |
# see https://docs.python.org/3.3/library/logging.handlers.html#sysloghandler | |
# | |
import logging | |
from logging.handlers import SysLogHandler | |
from logging import StreamHandler, Formatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
## It seems that locale will always be C(ascii) when | |
## mutt call this script via mailcap | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
from icalendar import Calendar | |
import pytz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LDFLAGS="-Wl,-z,relro,-z,now" | |
mk_add_options PYTHON=/usr/bin/python2 | |
mk_add_options AUTOCONF=autoconf-2.13 | |
mk_add_options MOZ_MAKE_FLAGS="-j8" | |
export MOZ_JEMALLOC=1 | |
ac_add_options --host=x86_64-pc-linux-gnu | |
ac_add_options --target=x86_64-pc-linux-gnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.momoka; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import com.fasterxml.jackson.annotation.JsonAutoDetect; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.SerializationFeature; |
OlderNewer