Skip to content

Instantly share code, notes, and snippets.

View iomz's full-sized avatar
❤️‍🔥

Iori Mizutani iomz

❤️‍🔥
  • University of St.Gallen
  • St.Gallen, Switzerland
  • 19:27 (UTC +02:00)
  • X @iomz
View GitHub Profile
@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@tamuratak
tamuratak / ruby-cntk.md
Last active April 7, 2017 05:18
SWIGを使って Microsoft Cognitive Toolkit (CNTK) のRuby用バインディングを作成しました

SWIGを使って Microsoft Cognitive Toolkit (CNTK) のRuby用バインディングを作成しました。

CNTK は C++ で実装されたディープラーニングのオープンソース実装でして、昨年 Python 用バインディングが追加されました。 このバインディングは SWIG を使って実装されています。C#, R 用のバインディングも作成することが予定されていて、 そのため採用されたのだと思います。なのでSWIGを使えばRuby用のバインディングも作成できるわけでして、作成しました。

Tensorflow に関しても同様の試みがなされていますが、CNTK の場合ほとんど全て C++ で実装されているので、 SWIGを使えばバインディングを作るのが非常に容易だという特徴が挙げられます。

https://github.com/tamuratak/ruby-cntk

@lmarkus
lmarkus / README.MD
Last active May 2, 2024 09:21
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@jdewit
jdewit / vim74_lua
Last active January 30, 2024 04:57
Installing vim 7.4 with lua on Ubuntu 12.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
@urin
urin / makefile
Last active October 20, 2023 15:18
makefile - simple template to make an executable from *.cpp files.
COMPILER = g++
CFLAGS = -g -MMD -MP -Wall -Wextra -Winit-self -Wno-missing-field-initializers
ifeq "$(shell getconf LONG_BIT)" "64"
LDFLAGS =
else
LDFLAGS =
endif
LIBS =
INCLUDE = -I./include
TARGET = ./bin/$(shell basename `readlink -f .`)
@mrowe
mrowe / anything-git-project-files.el
Created August 2, 2012 01:17
Anything source to search files in current GIT project (http://www.emacswiki.org/emacs/AnythingSources#toc64)
(defvar anything-c-source-git-project-files-cache nil "(path signature cached-buffer)")
(defvar anything-c-source-git-project-files
'((name . "Files from Current GIT Project")
(init . (lambda ()
(let* ((git-top-dir (magit-get-top-dir (if (buffer-file-name)
(file-name-directory (buffer-file-name))
default-directory)))
(top-dir (if git-top-dir
(file-truename git-top-dir)
default-directory))
@tily
tily / generate-party-conversation.rb
Created February 11, 2012 08:04
Twitterの人と飲み会とかで会ったときに話せばいいことを相手に対する favorite のログから生成する
# coding:utf-8
require 'rubygems'
require 'mongo'
include Mongo
# USAGE: ruby generate-party-conversation.rb tily todesking
me, target = ARGV
templates = DATA.read.split("\n")
db = Connection.new.db('twitter')
@hitode909
hitode909 / shuffle_animation_gif.rb
Created January 14, 2012 07:12
shuffle_animation_gif.rb
# -*- coding: utf-8 -*-
require 'rubygems'
require 'RMagick'
filename = ARGV.first
unless filename
warn "usage: #{$0} <ANIMATION GIF FILE>"
exit 1
end
# -*- coding: utf-8 -*-
require 'glitch-ime'
input = ARGV.first
text = input + input.split(//).reverse[1..-1].join('')
ime = GlitchIME.new(text)
10.times {