Skip to content

Instantly share code, notes, and snippets.

View ctulek's full-sized avatar

Çağdaş Tülek ctulek

View GitHub Profile
extern crate core;
extern crate minifb;
use std::{mem, thread};
use std::ops::Deref;
use std::sync::Arc;
use std::sync::atomic::{AtomicI8, AtomicU32, Ordering};
use std::thread::JoinHandle;
use std::time::Duration;
@ctulek
ctulek / gist:0e15f8d9a2faeb1e6235
Created December 17, 2015 21:36
AWS API Gateway Mapping Template to add all header, query, path, and stage parameters to JSON dynamically
{
"request": {
"context": {
"stage": "$context.stage"
},
"path": {
#foreach( $key in $input.params().path.keySet())
"$key": "$input.params().path.get($key)"#if( $velocityHasNext ),#end
#end
},
gulp.task('babel', function () {
return gulp.src(['src/**/*.js*', '!src/**/*.test.js'])
.pipe(plumber({
errorHandler: function (err) {
console.log(err['filename'] || err['name']);
console.log(err['message']);
console.log(err['loc']);
console.log(err['codeFrame'] || err['stack']);
this.emit('end');
}
TypeError
/Users/cagdas/classroomapi/extension/capi/src/group/views/list.jsx: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got undefined
undefined
TypeError: /Users/cagdas/classroomapi/extension/capi/src/group/views/list.jsx: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got undefined
at Object.validate (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-types/lib/definitions/index.js:97:13)
at Object.validate (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-types/lib/index.js:267:9)
at NodePath._replaceWith (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-traverse/lib/path/replacement.js:203:7)
at NodePath.replaceWith (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-traverse/lib/path/replacement.js:181:8)
at NodePath.replaceInline (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-traverse/lib/path/replacement.js:291:17)
at Array.enter (/Users/cagd
AssertionError: ..src/stream/views/main.jsx: false == true
at exports.hoist (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-regenerator/lib/hoist.js:21:10)
at PluginPass.exports.visitor.Function.exit (/Users/cagdas/classroomapi/extension/capi/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-regenerator/lib/visit.js:85:18)
at newFn (/Users/cagdas/classroomapi/extension/capi/node_modules/gulp-babel/node_modules/babel-core/node_modules/babel-traverse/lib/visitors.js:233:27)
at NodePath._call (/Users/cagdas/classroomapi/extension/capi/node_modules/gulp-babel/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:72:18)
at NodePath.call (/Users/cagdas/classroomapi/extension/capi/node_modules/gulp-babel/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:44:17)
at NodePath.visit (/Users/cagdas/classroomapi/extension/capi/node_modules/gulp-babel/node_modules/babel-core/node
@ctulek
ctulek / README.md
Last active November 15, 2016 15:49
Gulp File for AWS Lambda

This is a simple gulpfile to compile and upload lambda functions to AWS.

Each lambda function is a separate folder next to gulpfile. Gulp compiles and packages each lambda function as a zip file under "dist" folder.

Gulpfile also puts an ".env" file to each zip package for lambda functions to differentiate between different environments.

See index.js and config.js for the usage of environments.

I0728 11:42:26.174176 1947607808 exec.cpp:132] Version: 0.23.0
E0728 11:42:26.177459 232513536 socket.hpp:107] Shutdown failed on fd=14: Socket is not connected [57]
I0728 11:42:26.177564 230367232 exec.cpp:206] Executor registered on slave 20150728-112319-3523280906-5050-1627-S0
E0728 11:42:26.177793 232513536 socket.hpp:107] Shutdown failed on fd=15: Socket is not connected [57]
ABORT: (src/subprocess.cpp:163): Failed to os::execvpe in childMain: No such file or directory*** Aborted at 1438108946 (unix time) try "date -d @1438108946" if you are using GNU date ***
PC: @ 0x7fff90bca286 __pthread_kill
*** SIGABRT (@0x7fff90bca286) received by PID 3207 (TID 0x10dc35000) stack trace: ***
@ 0x7fff86e05f1a _sigtramp
@ 0x1206800000040 (unknown)
@ 0x7fff8bd08b53 abort
call pathogen#infect()
filetype plugin indent on
syntax enable
set number
set ar
" Search
set smartcase
set hlsearch
@ctulek
ctulek / SICP Exercises.scm
Last active August 9, 2019 22:19
My solutions to exercises in SICP Book. (Warning: May have bugs or be wrong)
(define true #t)
(define false #f)
(define pi 3.14159)
(define radius 10)
(* pi (* radius radius))
(define circumference (* 2 pi radius))
(define (square x) (* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
Warning: libmemcached already installed
==> Downloading http://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz
File already downloaded in /Users/ctulek/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ctulek/Library/Caches/Homebrew/libmemcached-1.0.4.tar.gz
==> ./configure --prefix=/usr/local/Cellar/libmemcached/1.0.4
./configure --prefix=/usr/local/Cellar/libmemcached/1.0.4
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c