This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__kernel | |
void hello( | |
__global __read_only char * restrict a, | |
__global __write_only char * restrict b) | |
{ | |
b[0] = 'H'; | |
b[1] = 'e'; | |
b[2] = 'l'; | |
b[3] = 'l'; | |
b[4] = 'o'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Keeps a ssh tunnel open | |
After=network.target | |
[Service] | |
User=yourusername | |
ExecStart=/usr/bin/autossh \ | |
-M 0 -N -L '8080:somehost:8080' \ | |
-o "BatchMode yes" \ | |
-o "StrictHostKeyChecking no" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# FirefoxのmboxファイルをMewのMH形式に変換します。 | |
# (Firefoxの管理用フィールドを削除して変換します。) | |
# | |
# ■使い方 | |
# $ mbox2mh input-mbox-file | |
# | |
# ■出力 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mew用メール検索 (mgの代替) | |
# | |
# ■mewから渡される引数 | |
# $1 ... 検索文字列(EUC-JP) | |
# $2以降 ... 検索対象のメールのインデックス(1 2 3 ...) | |
# pwdがメールフォルダであるため、そのままファイル名である | |
# | |
# ■mewが期待する出力 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; You need "xsel" program. | |
(defun x-paste () | |
"insert text on X11's clipboard to current buffer." | |
(interactive) | |
(insert-string (shell-command-to-string "xsel -b"))) | |
(defun x-copy () | |
"copy text on local kill-ring to X11's clipboard." | |
(interactive) |