Skip to content

Instantly share code, notes, and snippets.

sgur

Block or report user

Report or block sgur

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
View codec-calc.cc
// https://twitter.com/herumi/status/983496460753821696
int calc_mine(int a, int b, int s) {
return a >> (32 - __builtin_clz(a ^ b));
// return (a & b) >> (32 - __builtin_clz(a ^ b));
}
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@mattn
mattn / fw.go
Created Feb 9, 2017
Remove Windows Firewall Rules which is generated by "go run"
View fw.go
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strings"
"github.com/go-ole/go-ole"
@voluntas
voluntas / react.rst
Last active Oct 19, 2019
React コトハジメ
View react.rst

React コトハジメ

日時:2017-01-02
作:@voluntas
バージョン:2.1.0
URL:https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@nanto
nanto / Emittable.ts
Last active Mar 23, 2017
An emitter (observer pattern) implementation to mixin, written in TypeScript.
View Emittable.ts
// An emitter implementation to mixin.
//
// This file is in the public domain.
//
// Usage:
//
// import Emittable from "...";
//
// class MyEmitter implements Emittable {
// on = Emittable.on;
@nownabe
nownabe / .commit_template
Created Jul 5, 2016
Emojiで楽しく綺麗なコミットを手に入れる
View .commit_template
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@yymm
yymm / want_to_ergodox.md
Last active Sep 14, 2018
Ergodox買おうの会
View want_to_ergodox.md

この記事のあの画像を見てビビッと来てしまったので, 周りにいる人とErgodoxの購入検討をはじめました(随時更新)

購入できるところ

➜ FalbaTech

ErgoDox - FalbaTech

選んでいくスタイル。

@nowri
nowri / jquery.redux.js
Last active Feb 24, 2019
jQueryでFluxライブラリreduxを使えるようになるPlugin
View jquery.redux.js
/*! jquery.redux.js | Copyright (c) 2015 nowri | The MIT License (MIT) */
(function(factory) {
if(typeof exports === 'object') {
factory(require('jquery'));
} else if(typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(jQuery);
}
}(function($) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active Nov 18, 2019
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@riverar
riverar / gist:fd6525579d6bbafc6e48
Last active Mar 22, 2019
C# structures to implement "Aero Glass" blur on Windows 10
View gist:fd6525579d6bbafc6e48
[DllImport("user32.dll")]
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[StructLayout(LayoutKind.Sequential)]
internal struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}
You can’t perform that action at this time.