Skip to content

Instantly share code, notes, and snippets.

View sgr's full-sized avatar

Shigeru Fujiwara sgr

  • Yokohama, Japan
View GitHub Profile
@sgr
sgr / cl-cuda-test.log
Created October 5, 2019 08:19
cl-cuda testing on Windows
To load "cl-cuda-test":
Load 1 ASDF system:
cl-cuda-test
; Loading "cl-cuda-test"
......
test cuInit
Invoking CU-INIT succeded.
test cuDeviceGet
Invoking CU-DEVICE-GET succeded.
CUDA device handle: 0
@sgr
sgr / testing-alloc-memory-block.md
Last active October 4, 2019 12:24
Testing alloc-memory-block
# Test script
```lisp
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
@sgr
sgr / file0.txt
Created March 5, 2018 19:09
Azure Logic App で Azure メトリックアラートを Slack に投稿する ref: https://qiita.com/sgr@github/items/b79405f952b8de8987a4
{
"properties": {
"context": {
"properties": {
"condition": {
"properties": {
"metricName": {
"type": "string"
},
"metricUnit": {
@sgr
sgr / file0.txt
Last active August 9, 2017 17:44
Raspberry Piでdocker-composeをインストールする ref: http://qiita.com/sgr@github/items/1de508bc89e4e7f3e299
$ git clone -b release https://github.com/docker/compose.git
$ cd compose
escape ^Tt
altscreen on
defscrollback 1000
termcapinfo xterm* ti@:te@
startup_message off
defbce on
term xterm-256color
hardstatus alwayslastline
#hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%'
#hardstatus alwayslastline "%{= cd} %-w%{= wk} %n %t* %{-}%+w %= LoadAVG [%l] "
@sgr
sgr / NSUUID+Base64.h
Created August 28, 2014 07:02
UUIDをなるべく短い文字列に変換する ref: http://qiita.com/sgr@github/items/1e720c916f0c80dff4f4
//
// NSUUID+Base64.h
//
//
#import <Foundation/Foundation.h>
@interface NSUUID (Base64)
- (instancetype)initWithBase64String:(NSString*)string withPadding:(BOOL)padding;
@sgr
sgr / workaround_the_iconservices_bug_mavericks.sh
Last active July 25, 2020 11:01
When "com.apple.IconServicesAgent" exhausts CPU resources on Mac OSX mavericks (10.9), you can try following workaround.
#!/bin/sh
mkdir ${TMPDIR}/com.apple.IconServices
@sgr
sgr / gist:1809056
Created February 12, 2012 15:27
condx: extends cond to allow 'if-let' style binding forms.
(defmacro condx-aux [f & clauses]
(when clauses
(list f (first clauses)
(if (next clauses) (second clauses)
(throw (IllegalArgumentException. "condx requires an even number of forms")))
(cons 'condx (next (next clauses))))))
(defmacro condx
"condx extends cond to allow 'if-let' style binding forms.
Example:
@sgr
sgr / .emacs
Created January 9, 2012 15:32
Initialize functions for Windows-native Common Lisp through SLIME on Cygwin Emacs.
(defun init-cygpath ()
(when (eq system-type 'cygwin)
(require 'compile)
(require 'cl)
(labels ((dquote (s) (concat "\"" s "\""))
(apply-cygpath (opt p)
(replace-regexp-in-string
"\n" ""
(shell-command-to-string
(mapconcat 'identity (list "cygpath" opt (dquote p)) " ")))))