Skip to content

Instantly share code, notes, and snippets.

View take-cheeze's full-sized avatar
💤

Takeshi Watanabe take-cheeze

💤
View GitHub Profile
@take-cheeze
take-cheeze / font_path_list.cxx
Created December 3, 2010 15:27
Get Font Path with X11
// g++ font_path_list.cxx $(pkg-config x11 --libs --cflags)
#include <X11/Xlib.h>
#include <cassert>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <iterator>
// g++ $(pkg-config gtk+-2.0 --libs --cflags) gtk_dialog.cxx
#include <cstdlib>
#include <string>
#include <gtk/gtk.h>
#include <glib.h>
void ShowMessageBox(GtkMessageType type, std::string const& title, std::string const& message)
@take-cheeze
take-cheeze / config.sub
Created April 25, 2011 11:27
PSP config.sub
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@take-cheeze
take-cheeze / .emacs
Created June 12, 2011 16:12
My ~/.emacs
(add-to-list 'load-path "~/Dropbox/config/emacs/site-lisp")
;; tab setting
(setq default-tab-width 4)
(setq c-basic-offset 4)
(setq c-auto-newline t)
(setq c-tab-always-indent nil)
;; transient-mark-mode
(transient-mark-mode t)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_CROSSCOMPILING TRUE)
set(BUILD_SHARED_LIBS FALSE)
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
# find executables
foreach(i "psp-config" "mksfo" "pack-pbp" "psp-fixup-imports" "psp-strip" "psp-prxgen" "psp-build-exports" "psp-gcc" "psp-g++")
string(REGEX REPLACE "-" "_" variable ${i})
@take-cheeze
take-cheeze / lilium.php
Created August 9, 2011 03:11
http://nanami-city.info/?e=885 http://mystia.tumblr.com/post/8614061413/tumblr の改良とか。s/Stauts/Status/とか存在するファイルを飛ばすのとか。quickモードの追加
<?php
// =========================================================
//
// * Lilium *
//
// Tumblrの画像を保存されている最大サイズで一括保存するためのアレ
//
// =========================================================
//
// * Usage *
#!/usr/bin/env node
// script to get all image of target account like lilium.php
// process.argv[2] <- account name
// process.argv[3] <- directory
// process.argv[4] <- if 'quick' it will be quick mode
var fs = require('fs');
var util = require('util');
var http = require('http');
#!/usr/bin/env python
import sys
import zlib
import Image
print "// openning", sys.argv[1]
img = Image.open(sys.argv[1])
#!/usr/bin/env node
// script to get all image of target account like lilium.php
// process.argv[2] <- account name
// process.argv[3] <- directory
// process.argv[4] <- if 'quick' it will be quick mode
var fs = require('fs');
var util = require('util');
var http = require('http');
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
include(CMakeForceCompiler)
cmake_force_c_compiler(i586-mingw32msvc-gcc GNU)
cmake_force_cxx_compiler(i586-mingw32msvc-g++ GNU)
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
# here is the target environment located