Skip to content

Instantly share code, notes, and snippets.

View sevkin's full-sized avatar

Vsevolod Balashov sevkin

View GitHub Profile
@koron
koron / ractive_user.coffee
Created January 29, 2014 05:16
ChaplinでRactiveを使うのに必要なもの、そのサンプル。
class RactiveView extends Chaplin.View
# どの要素にデータを流しこむか指定するセレクタ
el: '#main'
# テンプレート名、getTemplate で使われる
templateName: 'template_empty'
# 変更不可: dipose メソッドを正しくオーバーライドするために必要
keepElement: true
@nmsdvid
nmsdvid / new_gist_file.js
Created February 4, 2014 16:32
Simple JavaScript Debounce Function
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
clearTimeout(timeout);
@wbroek
wbroek / genymotionwithplay.txt
Last active December 16, 2025 11:18
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@ydnar
ydnar / hitch-example.go
Last active December 26, 2017 01:24
hitch: middleware + routing for vanilla go http.Handlers — https://github.com/nbio/hitch
package main
import (
"fmt"
"net/http"
"github.com/nbio/hitch"
"github.com/nbio/httpcontext"
"github.com/nbio/httpgzip"
)
@bellbind
bellbind / loader.html
Last active May 4, 2024 04:42
[threejs][html5]STL File Viewer with HTML5 File API
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>STL File Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"
></script>
<script src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js"
></script>
<script src="loader.js"></script>
@mvadu
mvadu / grafana custom.ini
Last active January 19, 2025 13:38
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 6, 2025 19:03
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@terlar
terlar / kubectl.fish
Last active March 11, 2025 14:48
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end
@sergiks
sergiks / vkscript.php
Last active December 3, 2017 09:51
calling VKScript
<?php
$params = array(
'code' => " говнокод here ",
'access_token' => $token,
'v' => 5.64,
);
$url = 'https://api.vk.com/method/execute'. '?' . http_build_query( $params);