Skip to content

Instantly share code, notes, and snippets.

View ponpoko1968's full-sized avatar
🏠
Working from home

Shuji OCHI ponpoko1968

🏠
Working from home
View GitHub Profile
void MyCreatePDFFile (CGRect pageRect, const char *filename)// 1
{
CGContextRef pdfContext;
CFStringRef path;
CFURLRef url;
CFDataRef boxData = NULL;
CFMutableDictionaryRef myDictionary = NULL;
CFMutableDictionaryRef pageDictionary = NULL;
path = CFStringCreateWithCString (NULL, filename, // 2
@ponpoko1968
ponpoko1968 / gist:4064318
Created November 13, 2012 06:32
fseventを使ってディレクトリを監視する。変更があったらsh.system()の内容を実行。
# This script watches modifications on the given directory, using the new
# FSEvents API in Leopard.
require 'osx/foundation'
require 'shell'
OSX.require_framework '/Syste
@ponpoko1968
ponpoko1968 / file0.txt
Last active January 4, 2016 03:47
emacs flycheckでSwiftの構文チェックを行う ref: http://qiita.com/ponpoko1968/items/78629472038c019f9f4d
$ brew instal xctool
@ponpoko1968
ponpoko1968 / file0.txt
Last active June 21, 2019 01:34
swift-modeでのsmartparensを少し改良する ref: https://qiita.com/ponpoko1968/items/3f435193d05b96ecc4ae
\(
@ponpoko1968
ponpoko1968 / keymap.c
Last active November 26, 2017 05:16
Layerが切り替わったら背面LEDの色も変える
uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 0:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ponpoko1968
ponpoko1968 / keymap.c
Last active April 28, 2019 09:30
Helix keymap
#include QMK_KEYBOARD_H
#include "bootloader.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#ifdef SSD1306OLED