Skip to content

Instantly share code, notes, and snippets.

Stephen von Takach stakach

Block or report user

Report or block stakach

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
@stakach
stakach / google_auth.cr
Created Aug 7, 2019
Crystal Lang Google Calendar
View google_auth.cr
require "jwt"
require "json"
require "http"
require "uri"
require "./http_proxy"
class GoogleAuth
GOOGLE_URI = URI.parse("https://www.googleapis.com")
TOKEN_PATH = "/oauth2/v4/token"
View manager.rb
# frozen_string_literal: true
require 'netsnmp'
require 'logger'
module NETSNMP
# Provides a base class for building SNMP Managers
#
# Does not implement a transport so must be subclassed
@stakach
stakach / dtls_api.md
Created Jan 5, 2017 — forked from Jxck/dtls_api.md
OpenSSL DTLS API
View dtls_api.md

OpenSSL DTLS API

The API used for DTLS is mostly the same as for TLS, because of the mapping of generic functions to protocol specifc ones. Some additional functions are still necessary, because of the new BIO objects and the timer handling for handshake messages. The generic concept of the API is described in the following sections. Examples of applications using DTLS are available at [9].

DTLS の API は TLS とほぼ同じ。 BIO オブジェクトの生成とタイマのために追加でいくつか必要。

@stakach
stakach / $namedRoute.js
Last active May 13, 2018
Augments AngularJS $route provider with route naming.
View $namedRoute.js
(function(angular) {
'use strict';
/*
Usage:
-----
FILE --app.js--
@stakach
stakach / gist:5335327
Created Apr 8, 2013
AngularJS Mobile + Desktop Events
View gist:5335327
(function(angular, undefined) {
'use strict';
angular.module('Core.SafeApply', []).
service('Core.SafeApply', function() {
this.do = function(scope, fn) {
var phase = scope.$root.$$phase;
if(phase == '$apply' || phase == '$digest') {
fn();
@stakach
stakach / gist:5204160
Created Mar 20, 2013
Fiber vs Thread using futures
View gist:5204160
require 'celluloid'
require 'benchmark'
class Example
include Celluloid
def slow_method
sleep 5
end
@stakach
stakach / gist:5204063
Created Mar 20, 2013
Celluloid Actors vs Actor Pools - Fibres vs Threads
View gist:5204063
require 'celluloid'
require 'benchmark'
$mutex = Mutex.new
$resource = ConditionVariable.new
class Example
include Celluloid
def slow_method
View gemfile.rb
source 'https://rubygems.org'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
You can’t perform that action at this time.