Skip to content

Instantly share code, notes, and snippets.

View ceroloy's full-sized avatar

Cemre Demirel ceroloy

  • Netherlands
View GitHub Profile
@buildAI
buildAI / cs_reading_list.md
Created January 14, 2016 19:44
CS reading list
  1. The Little Schemer by Daniel P. Friedman
  2. The Art of Computer Programming by Donald E. Knuth
  3. Modern Operating Systems by Andrew S. Tanenbaum
  4. Gödel, Escher, Bach: An Eternal Golden Braid by Douglas R. Hofstadter
  5. Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Grady Booch
  6. TCP/IP Illustrated by W. Richard Stevens
  7. Structure and Interpretation of Computer Programs by Harold Abelson, Gerald Jay Sussman
@fjammes
fjammes / 10-kubeadm.conf
Last active March 13, 2019 07:56
Set up a kubernetes 1.9.1 cluster on Centos7
# Comment line 9 in /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
# Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
@glenrobertson
glenrobertson / TileLayer.GeoJSON.js
Last active August 2, 2021 07:11
Leaflet GeoJSON Tile Layer Example
// Load data tiles from an AJAX data source
L.TileLayer.Ajax = L.TileLayer.extend({
_requests: [],
_addTile: function (tilePoint) {
var tile = { datum: null, processed: false };
this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;
this._loadTile(tile, tilePoint);
},
// XMLHttpRequest handler; closure over the XHR object, the layer, and the tile
_xhrHandler: function (req, layer, tile, tilePoint) {
@schlamar
schlamar / example.py
Last active February 13, 2022 18:15
mplog: Python advanced multiprocessing logging.
import logging
import multiprocessing
import time
import mplog
FORMAT = '%(asctime)s - %(processName)s - %(levelname)s - %(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
existing_logger = logging.getLogger('x')
@brunoleles
brunoleles / deb: command not found.md
Last active February 23, 2022 14:27
Add repository on Debian when "deb" command is not available

deb: command not found

This gist seems to be not working anymore

Possible alternative solution https://unix.stackexchange.com/a/508728 ( not tested )

The Problem

$> deb http://ftp.debian.org/debian jessie-backports main
@pratos
pratos / gcloud_docker_setup.md
Last active January 12, 2023 18:26
Installing gcloud on Ubuntu 16.04 LTS

Installing it using cURL

$ curl https://sdk.cloud.google.com | bash

When the first time you run the above statement, it might be that you'll get the following error if python2 is not installed in your system.

Welcome to the Google Cloud SDK!
Traceback (most recent call last):
  File "/home/pratos/google-cloud-sdk/lib/third_party/enum/__init__.py", line 364, in __getattr__
@adamgibbons
adamgibbons / install-mongodb.md
Last active January 17, 2023 15:17
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@samwize
samwize / mocha-guide-to-testing.js
Created February 8, 2014 05:53
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@sinedied
sinedied / angular.md
Last active November 8, 2023 22:53
The Missing Introduction to Angular 2 and Modern Design Patterns

Introduction to Angular

Angular (aka Angular 2) is a new framework completely rewritten from the ground up, replacing the famous AngularJS framework (aka Angular 1.x).

More that just a framework, Angular should now be considered as a whole platform which comes with a complete set of tools, like its own CLI, debug utilities or performance tools.

Getting started

@icirellik
icirellik / test.js
Created August 25, 2015 20:02
Pass data between beforeEach, afterEach and it in mocha tests.
var expect = require('expect');
describe.only('Sample', function () {
beforeEach(function () {
this.currentTest.value = 'Winning!';
});
it('Uses current test data', function () {
expect(this.test.value).to.equal('Winning!');