Skip to content

Instantly share code, notes, and snippets.

@esimov
esimov / sublime_haml_to_html.json
Last active March 4, 2017 00:52
Sublime build for HAML->HTML automatic conversion
{
"cmd": ["haml"],
"working_dir": "${file_path:${folder}}",
"selector": "source.haml",
"file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
"windows":
{
"cmd": ["haml", "--trace", "$file", "${file_base_name}.html"],
"shell": "true"
@alucky0707
alucky0707 / timer.rb
Last active December 31, 2015 20:49
勢いで作った艦これタイマー。自動で時間を設定する機能はありません。また、画像と音声は自分で探してきてください。 win32-soundに依存しているのでWindows限定です。
require 'tk'
require 'tkextlib/tkimg/png'
require 'tkextlib/tkimg/jpeg'
require "win32/sound"
include Win32
#表示したい画像(png,gif,jpegならいける)
img = TkPhotoImage.new file: "./girl.png"
w = img.width
h = img.height
@jokecamp
jokecamp / example.dart
Created January 17, 2014 17:24
Dart HMAC SHA 256 Example code
import 'dart:html';
import 'dart:convert';
import 'package:crypto/crypto.dart';
void main() {
String secret = 'secret';
String message = 'Message';
List<int> secretBytes = UTF8.encode('secret');
@kyontan
kyontan / README.md
Last active August 29, 2015 13:56
Refrection and Refraction Simulator using Xwindow

反射・屈折のシミュレータ

ソースの質に関してはお察しください

コンパイル方法

  • Mac ( XQuartz が必要です。 ここからダウンロードしてください。)
clang++ reflection_reflaction.cpp -std=c++11 -I /usr/X11R6/include -L /usr/X11R6/lib -l X11
@justmoon
justmoon / custom-error.js
Last active April 14, 2024 14:27 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@k3kaimu
k3kaimu / gist:c850931bc8d9dd98693d
Last active August 29, 2015 14:17
awebviewの紹介

awebviewはHTMLでGUIが書けるAwesomiumのラッパー

Awesomiumとは

Awesomiumとは、Chromiumの機能のうち、Web画面のレンダリングやイベント処理などをC++から直接扱えるライブラリです。 このライブラリを使うと、たとえばゲーム画面にウェブブラウザを設置できたり、HTML+Javascript+CSSを用いてGUIアプリケーションを構築可能です。 非オープンソースなライブラリであり、非商用であれば無償で利用することができますが、商用製品に組み込む場合は有償のようです。

awebviewとは

@rjohnsondev
rjohnsondev / autocomplete.py
Created July 19, 2016 23:12
Google Cloud Platform gcloud tab completion for fish shell.
#!/usr/bin/python
# To activate: complete --command gcloud --arguments="(/home/richard/gcloud/google-cloud-sdk/autocomplete.py (commandline -cp))"
import re
import subprocess
import sys
def parse_help(h):
commands = {}