Skip to content

Instantly share code, notes, and snippets.

ytomino

Block or report user

Report or block ytomino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ytomino
ytomino / adaside.adb
Last active Jul 25, 2019
Ada tagged record derived from C++ class
View adaside.adb
package body adaside is
use type Interfaces.C.int;
function Constructor (n : Interfaces.C.int) return T is
begin
return (cppclass_hpp.Class_cppclass_t.New_cppclass_t (n)
with null record);
end Constructor;
overriding function get (this : access T) return Interfaces.C.int is
begin
return this.n_u * 2; -- replace the body
@ytomino
ytomino / commands_to_eisuu_kana.json
Created Jul 25, 2019
Commands to EISUU/Kana for Karabinar Elements
View commands_to_eisuu_kana.json
{
"title": "using",
"rules": [
{
"description": "Commands to EISUU/Kana",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
@ytomino
ytomino / userChrome.css
Created Oct 16, 2018
Make Firefox's minimize/maximize/close buttons to white for using Firefox's dark theme, in DE's white theme (KDE Breeze)
View userChrome.css
#titlebar-min,
#titlebar-max,
#titlebar-close {
/* -moz-appearance: -moz-window-button-minimize !important; */
-moz-appearance: none !important;
list-style-position: outside;
-moz-image-region: rect(0, 18px, 18px, 0);
padding: 0px 0px 0px 0px !important;
margin: 0px 0px 0px 4px !important;
}
@ytomino
ytomino / terror.py
Last active Jul 10, 2019
The reformatter for compiler's error messsages
View terror.py
#!/usr/bin/python
import fnmatch
import os
import re
import sys
msgtype = "gcc"
rootdir = os.getcwd()
workdir = rootdir
@ytomino
ytomino / gen-pc.sh
Last active Nov 24, 2017
Generate drake.pc for pkg-config
View gen-pc.sh
#!/bin/bash
function usage {
echo "$0 [--gcc=...] [--name=...] --RTS=... > FILENAME.pc" > /dev/stderr
exit 1
}
LOG=/dev/null
URL=https://github.com/ytomino/drake
@ytomino
ytomino / c-alloca.ads
Last active Nov 12, 2017
**experimental** x32 ABI on x86_64-pc-linux-gnu
View c-alloca.ads
-- This file is translated by "headmaster" version 0.28-9ebd462 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (size : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / rst2rst.py
Created Oct 31, 2017
rtf2rtf: convert rtf to human friendly rtf.
View rst2rst.py
#!/usr/bin/env python
import codecs, locale, re, sys
if len(sys.argv) > 1 and sys.argv[1] == '-h':
print "rtf2rtf: convert rtf to human friendly rtf."
exit(0)
def sep(s):
c = s[0]
@ytomino
ytomino / .zprofile.sh
Last active Oct 30, 2017
command not foundと相対パスcdを弾くzshaddhistory
View .zprofile.sh
function zshaddhistory {
local cmdline cmd dir
cmdline=( ${=1} )
if [[ ${cmdline[1]} =~ '[`(]' ]]; then
return 0 # do not want to exec something on expansion
else
cmd=${(e)~cmdline[1]}
if [[ ${cmd} == cd ]]; then
if [[ ${cmdline[2]} =~ '[`(]' ]]; then
return 0 # do not want to exec something on expansion
@ytomino
ytomino / c-alloca.ads
Last active May 12, 2018
x86_64-apple-darwin13
View c-alloca.ads
-- This file is translated by "headmaster" version 0.28-14aca93 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active May 12, 2018
x86_64-apple-darwin12
View c-alloca.ads
-- This file is translated by "headmaster" version 0.29-eab9670 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
You can’t perform that action at this time.