Skip to content

Instantly share code, notes, and snippets.

Avatar

Shigeru Fujiwara sgr

  • Yokohama, Japan
View GitHub Profile
@sgr
sgr / cl-cuda-test.log
Created Oct 5, 2019
cl-cuda testing on Windows
View cl-cuda-test.log
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 Oct 4, 2019
Testing alloc-memory-block
View testing-alloc-memory-block.md
# Test script
```lisp
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
@sgr
sgr / file0.txt
Created Mar 5, 2018
Azure Logic App で Azure メトリックアラートを Slack に投稿する ref: https://qiita.com/sgr@github/items/b79405f952b8de8987a4
View file0.txt
{
"properties": {
"context": {
"properties": {
"condition": {
"properties": {
"metricName": {
"type": "string"
},
"metricUnit": {
@sgr
sgr / file0.txt
Last active Aug 9, 2017
Raspberry Piでdocker-composeをインストールする ref: http://qiita.com/sgr@github/items/1de508bc89e4e7f3e299
View file0.txt
$ git clone -b release https://github.com/docker/compose.git
$ cd compose
View .screenrc
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 Aug 28, 2014
UUIDをなるべく短い文字列に変換する ref: http://qiita.com/sgr@github/items/1e720c916f0c80dff4f4
View NSUUID+Base64.h
//
// 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 Jul 25, 2020
When "com.apple.IconServicesAgent" exhausts CPU resources on Mac OSX mavericks (10.9), you can try following workaround.
View workaround_the_iconservices_bug_mavericks.sh
#!/bin/sh
mkdir ${TMPDIR}/com.apple.IconServices
@sgr
sgr / gist:1809056
Created Feb 12, 2012
condx: extends cond to allow 'if-let' style binding forms.
View gist:1809056
(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 Jan 9, 2012
Initialize functions for Windows-native Common Lisp through SLIME on Cygwin Emacs.
View .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)) " ")))))
You can’t perform that action at this time.