Skip to content

Instantly share code, notes, and snippets.

View ceremcem's full-sized avatar

Cerem Cem ASLAN ceremcem

View GitHub Profile
@ceremcem
ceremcem / debian-scratch-sources.list
Created July 30, 2015 07:06
/etc/apt/sources.list for Debian Scratch
#
# deb http://ftp.debian.org/debian/ jessie-updates main
# deb-src http://ftp.debian.org/debian/ jessie-updates main
# jessie-backports, previously on backports.debian.org
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-backports main
@ceremcem
ceremcem / broker.js
Last active August 29, 2015 14:27 — forked from jedi4ever/broker.js
xsub , xpub example in nodejs
var pubListener = 'tcp://127.0.0.1:5555';
var subListener = 'tcp://127.0.0.1:5556';
var hwm = 1000;
var verbose = 0;
// The xsub listener is where pubs connect to
var subSock = zmq.socket('xsub');
subSock.identity = 'subscriber' + process.pid;
subSock.bindSync(subListener);
EnterNotify event, serial 32, synthetic NO, window 0x1000001,
root 0x101, subw 0x0, time 5235594, (67,569), root:(67,569),
mode NotifyNormal, detail NotifyInferior, same_screen YES,
focus YES, state 0
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
MotionNotify event, serial 32, synthetic NO, window 0x1000001,
@ceremcem
ceremcem / websocket_proxy_params
Last active September 5, 2015 13:41
Nginx proxy node.js socket.io app
# this is the necessary configurations for
# proxying a socket.io Node.js application with Nginx
#
# check for updates at: https://gist.github.com/ceremcem/5176ac7215b5b669f601
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
@ceremcem
ceremcem / iterate_over_class_or_method.py
Created September 12, 2015 10:17
Performance comparison between iteration over list of classes and list of class methods
import time
class a:
def do_something(self, x):
return x**2
def do_something1(self, x):
return x**2
This file has been truncated, but you can view the full file.
Tue, 13 Oct 2015 22:50:14 GMT brunch:watch Loaded plugins: css-brunch, jade-static-brunch, javascript-brunch, less-brunch, livescript-brunch
Tue, 13 Oct 2015 22:50:14 GMT brunch:file-list Reading 'node_modules/jade-static-brunch/node_modules/jade/runtime.js'
Tue, 13 Oct 2015 22:50:14 GMT brunch:watch File 'app' received event 'addDir'
Tue, 13 Oct 2015 22:50:15 GMT brunch:watch File 'test' received event 'addDir'
Tue, 13 Oct 2015 22:50:15 GMT brunch:watch File 'vendor' received event 'addDir'
Tue, 13 Oct 2015 22:50:15 GMT brunch:watch File 'package.json' received event 'add'
Tue, 13 Oct 2015 22:50:15 GMT brunch:watch File 'config.coffee' received event 'add'
Tue, 13 Oct 2015 22:50:15 GMT brunch:source-file Initializing fs_utils.SourceFile: {"path":"node_modules/jade-static-brunch/node_modules/jade/runtime.js","isntModule":true,"isWrapped":true}
Tue, 13 Oct 2015 22:50:15 GMT brunch:pipeline Compiling 'node_modules/jade-static-brunch/node_modules/jade/runtime.js' with 'JavaScriptCompiler'
Tue, 13 Oct 2015 22:50:
<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en" class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="aktos elektronik: yazılım - donanım - otomasyon - telemetri - IoT. Geniş çaplı otomasyon, telemetri ve IoT projelerinde kullanılmak üzere yerli üretim yazılım ve donanım üretir, doğrudan uygulama yapar.">
<link rel="icon" type="image/png" href="img/aktos-icon.png">
moved to: https://github.com/ceremcem/kicad-install
#!/usr/bin/env python
__author__ = 'ceremcem'
import cv2
import numpy as np
def test_cv():
c = cv2.VideoCapture('1.jpg')
#!/bin/bash
#bash ./library-repos-install.sh --install-or-update
cd ~/kicad_sources/kicad-lib.bzr
bzr update
echo "Copying modules, library and template to /usr/local/share/kicad/"
sudo cp ~/kicad_sources/kicad-lib.bzr/{modules,library,template} /usr/local/share/kicad -a
sudo chown root:staff /usr/local/share/kicad/*
sudo chmod 755 /usr/local/share/kicad/*