Skip to content

Instantly share code, notes, and snippets.

View zet4's full-sized avatar
🏠
Working from home

Aleksandr Tihomirov zet4

🏠
Working from home
View GitHub Profile
@zet4
zet4 / Arke_CLA.md
Last active February 12, 2017 19:48 — forked from overheadhunter/Cryptomator_CLA.md
Arke Individual Contributor License Agreement

###Arke Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by the Arke developers (Tobias Hagemann, Markus Kreusch and Sebastian Stenzel) (“Arke”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Arke in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact hunter@zeta.pm.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Ark

@zet4
zet4 / sse.go
Created December 5, 2016 19:03 — forked from schmohlio/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"
@zet4
zet4 / preprocessor_fun.h
Created April 21, 2016 09:38 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@zet4
zet4 / desktop.boxstarter
Created January 23, 2016 13:21 — forked from lepinkainen/desktop.boxstarter
Boxstarter script
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
# Development
cinst -y powershell
cinst -y githubforwindows
cinst -y python3
cinst -y git.commandline
cinst -y sublimetext3
# Media
@zet4
zet4 / main.go
Created January 20, 2016 09:41 — forked from segphault/main.go
An IRC bot written in Go that provides notification when a RethinkDB cluster experiences issues
package main
import (
"code.google.com/p/gcfg"
"fmt"
r "github.com/dancannon/gorethink"
irc "github.com/fluffle/goirc/client"
"log"
"strings"
)
@zet4
zet4 / gist:5a333d34a7624f5e3846
Created September 23, 2015 06:41 — forked from bergantine/gist:1171682
Python Image Encoding in Data URI Scheme Base 64. #python #base64
data_uri = open("sample.png", "rb").read().encode("base64").replace("\n", "")
# HTML Image Element
img_tag = '<img alt="" src="data:image/png;base64,{0}">'.format(data_uri)
print img_tag
# CSS Background Image
css = 'background-image: url(data:image/png;base64,{0});'.format(data_uri)
print css
// constants -------------------------------------------------------------------
var alliedTypes = {
peasant: 'peasant',
soldier: 'soldier',
knight: 'knight',
librarian: 'librarian',
griffinRider: 'griffin-rider',
captain: 'captain'
};
#version 420
uniform mat4 projection_matrix;
uniform mat4 model_matrix;
void main()
{
int tri = gl_VertexID / 3;
int idx = gl_VertexID % 3;
int face = tri / 2;