Skip to content

Instantly share code, notes, and snippets.

View kosh04's full-sized avatar
🎧

KOBAYASHI Shigeru kosh04

🎧
View GitHub Profile
@snmsts
snmsts / hello world
Created September 4, 2013 04:17
generate "Hello World" without including any literal.
(defmacro def-print-string (name string)
`(defun ,name ()
(let ((one (count t'(t))))
(print
(coerce
(mapcar #'code-char
(list
,@(loop :for i :across string
:collect
`(+ ,@(loop :for j := (char-code i) :then (floor j #.(count t'(t t)))
@sharapeco
sharapeco / jshint.l
Created December 4, 2013 06:03
xyzzy で JSHint
(defun jshint (&optional (filename (get-buffer-file-name)))
"jscript-mode: このファイルの文法チェック"
(interactive)
(let (command
(bufname "*JSHint*")
(noerror-message "No errors detected")
buf
line
col
(error-message nil))
#include <memory>
#include <cstdio>
struct year{year(){ std::printf("あけましておめでとうございます.\n"); };};
using A = std::unique_ptr<year>;
int main()
{
A happy {new year};
@bowbow99
bowbow99 / framework.l
Created February 27, 2012 08:55
#xyzzy nanri-master から multiframe へ取り込んだ変更のテスト
;;; -*- mode: lisp; package: user -*-
#|
使い方(暫定):
1. どこかへ framework.l と nanri-master-change-tests.l をダウンロード
2. M-x load-file
load file: path/to/framework.l
3. M-x load-test-file
test file: path/to/nanri-master-change-tests.l
4. M-x change-tests
@youz
youz / markdown-mode.l
Created November 4, 2011 12:53
改変 markdown-mode for #xyzzy (色付け & メジャーモード化)
;; -*- mode:lisp; package:markdown-mode -*-
;; markdown.l ( http://www.geocities.jp/kiaswebsite/xyzzy/markdown.html )
;; Rev: 227 を元に改変
;;
;; License
;; =======
;;
;; Copyright (c) 2011 Yousuke Ushiki <citrus.yubeshi@gmail.com>
;; Copyright (c) 2005,2006 kia
#include <stdio.h>
#include <stdlib.h>
#include "librtmp/rtmp.h"
int main(int argc, char *argv[]) {
if (argc < 3) {
printf("usage : %s url ticket\n", argv[0]);
return 1;
}
@rednaxelafx
rednaxelafx / chakra.reg
Created May 15, 2013 04:13
Running a simple microbenchmark on both 32-bit and 64-bit versions of JScript 5.8 and 9.0, on 64-bit Windodws 7
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra]
@="JScript Language"
@gurdiga
gurdiga / minify-js.sh
Created November 25, 2012 13:34
JS minifying script with curl and Closure Compiler REST API
#!/bin/sh
# Use like this:
#
# minify-js.sh < app.js > app.min.js
#
curl -s \
-d compilation_level=SIMPLE_OPTIMIZATIONS \
-d output_format=text \
@tondol
tondol / nicovideo_rtmpe.md
Last active June 9, 2018 02:50
ニコニコ公式アニメポータルのrtmpeプロトコル動画をダウンロードする覚え書き

はじめに

http://www.nicovideo.jp/watch/1380872606

上記の動画を例にDL方法を解説する。

パラメータの取得

# INSTRUCTIONS: save as ~/.gdbinit
# REVISION : 6.1
# CONTRIBUTORS: mammon_, elaine, pusillus, mong
# NOTES: 'help user' in gdb will list the commands/descriptions in this file
# 'context on' now enables auto-display of context screen
#
# CHANGELOG:
# Version 6.1
# fixed filename in step_to_call so it points to /dev/null
# changed location of logfiles from /tmp to ~