Skip to content

Instantly share code, notes, and snippets.

View izinin's full-sized avatar

Igor Zinin izinin

View GitHub Profile
@p120ph37
p120ph37 / chunkedpost.c
Created August 30, 2015 18:46
Curl example with chunked post
/*
* HTTP POST with chunked encoding.
*
* Usage:
* cc chunkedpost.c -lcurl -o chunkedpost
* ./chunkedpost
*
*/
#include <stdio.h>
#include <stdlib.h>
@okamayana
okamayana / ndk_basics.md
Last active August 1, 2024 05:46
Android Studio: Writing and calling JNI functions

Purpose

Writing JNI functions

  1. Create a new Android Studio project. To do so, select File -> New -> New Project.
@FND
FND / .gitignore
Last active November 28, 2018 09:53
Riot.js with ES6 via webpack
/node_modules
/dist
@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@tnhu
tnhu / visor-archivos-online.md
Last active December 10, 2018 12:15 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer
@tablekat
tablekat / main.ts
Created June 30, 2016 20:24
Making gmail push notifications to webhook
import * as request from 'request';
import * as fs from 'fs';
import * as readline from 'readline';
var google = require('googleapis');
var googleAuth = require('google-auth-library');
/*************** STEPS
- made a project on https://console.cloud.google.com/cloudpubsub/topicList?project=testmabs thing?
@rimusz
rimusz / preemtible_kubernetes.md
Last active July 7, 2018 02:52 — forked from tsuri/preemtible_kubernetes.md
kubernetes cluster w/ pre-emptible instances

Kubernetes clusters using preemtible instances

Motivation

People experimenting with kubernetes clusters on the GKE not necessarily have money to keep a full cluster on at all time. GKE clusters can be easily resized, but this still incurs in the full instance cost when the cluster is up.

Google has added preemptible instances that are ideal for many

@psamsotha
psamsotha / TestFrameworkStarter.java
Last active April 29, 2020 15:35
Starter for Jersey Test Framework
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
@speps
speps / bcast-server.go
Created September 18, 2016 09:06
Golang: server streaming data using channels broadcasting (one source, multiple destination)
package main
import (
"fmt"
"log"
"net/http"
"sync"
)
type worker struct {
/* jshint plusplus:false */
/* jshint quotmark:false */
compositor = (function(){
var VERTEX_SIZE = 2;
var COLOR_SIZE = 4;
var TEXTURE_SIZE = 1;
var REGION_SIZE = 2;
var ELEMENT_SIZE = VERTEX_SIZE + COLOR_SIZE + TEXTURE_SIZE + REGION_SIZE;
var ELEMENT_OFFSET = ELEMENT_SIZE * Float32Array.BYTES_PER_ELEMENT;