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
// Hello world with Zig and notcurses | |
// | |
// Fedora 35 Worstation | |
// Zig 0.9.0-dev.1798+0f63f3eeb | |
// notcurses 2.4.9 | |
// (1) Install notcurses dev library. | |
// | |
// $ sudo dnf install notcurses-devel | |
// |
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
" Vim syntax file | |
" | |
" Language: Kit | |
" Maintainer: MIURA Masahiro <echochamber@gmail.com> | |
" Last Change: 2018-10-30 | |
" License: GNU Lesser General Public License, version 3 | |
if exists("b:current_syntax") | |
finish |
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
% cat src/test.kit | |
rules AddOne { | |
(ADD_ONE(${x: Int})) => x + 1; | |
} | |
using rules AddOne; | |
function main() { | |
var foo = ADD_ONE(42_i); | |
} | |
% |
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/zsh | |
# Bind BackSpace key for Caps_Lock. | |
/usr/bin/xmodmap -e 'keycode 66 = BackSpace' | |
/usr/bin/xmodmap -e 'remove Lock = BackSpace' | |
/usr/bin/xset r 66 | |
# Bind Caps_Lock key for BackSpace. | |
/usr/bin/xmodmap -e 'keycode 22 = Caps_Lock' | |
/usr/bin/xmodmap -e 'add Lock = Caps_Lock' |
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 | |
#!/bin/zsh -x | |
# flac_renamer.sh - Renames FLAC files by tracknumbers. | |
# | |
# usage: | |
# $ ./flac_renamer.sh *.flac | |
# : e.g. MyArtist-MyTitle.flac is renamed to 01.flac | |
FLAC_FILES="$@" |
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
// simple HTTP client, based on | |
// https://mail.mozilla.org/pipermail/rust-dev/2013-August/005117.html | |
// | |
// Note: Envvar RUST_NEWRT=1 is required to compile and run this. | |
use std::rt::io::net::ip::{Ipv4Addr, SocketAddr}; | |
use std::rt::io::net::tcp::TcpStream; | |
use std::rt::io::{Reader, Writer}; | |
use std::str; |
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
#!/usr/bin/python | |
def main(): | |
gcCount = 0 | |
atCount = 0 | |
with open("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa", "r") as f: | |
for line in f: | |
if not line.startswith('>'): | |
# gcCount += line.count('G') + line.count('C') | |
# atCount += line.count('A') + line.count('T') |
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
#!/usr/local/dart/dart-sdk/bin/dart | |
// gc.dart | |
// cf. http://saml.rilspace.org/moar-languagez-gc-content-in-python-d-fpc-c-and-c | |
import 'dart:io'; | |
import 'dart:async'; | |
main() | |
{ |
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
% gdb ./falcon | |
GNU gdb (GDB) Fedora (7.5.1-38.fc18) | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-redhat-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
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/zsh -x | |
# ファイルに変更があったらブラウザを自動リロードする。 | |
# ブラウザ側に拡張などを入れる必要なし。 | |
# 要: inotifywait, xdotool | |
# 参考: http://stackoverflow.com/questions/4680109/how-to-reload-refresh-a-web-page-without-leaving-my-web-development-ide/10739606#10739606 | |
# 参考: http://unix.stackexchange.com/questions/37258/refresh-reload-active-browser-tab-from-command-line/42933#42933 | |
RELOAD_KEYS="CTRL+R" | |
# RELOAD_KEYS="SHIFT+CTRL+R" |
NewerOlder