Skip to content

Instantly share code, notes, and snippets.

View tzookb's full-sized avatar

Tzook Bar Noy tzookb

View GitHub Profile
@tzookb
tzookb / excludes
Created July 23, 2015 09:36
rsync laravel5 project
bootstrap/cache/*
.env
.idea
.git*
node_modules
storage/framework/cache/*
storage/framework/session/*
storage/framework/views/*
@tzookb
tzookb / BoxNode.js
Created October 17, 2015 07:54
javascript "class" skeleton
(function(){
'use strict';
var CircleNode = require("./CircleNode.js");
var BoxNode = function(index){
this.index = index;
};
BoxNode.circle = new CircleNode();
@tzookb
tzookb / citrusbyte.flatten-test.rb
Last active May 17, 2016 07:13
quick array flatten
require './flatten'
require 'minitest/autorun'
class StringTest < Minitest::Test
def test_simple_mult
res = flatten([1,2,[2,3],4])
assert_equal([1,2,3,4], res)
end
@tzookb
tzookb / 1.css
Created June 28, 2016 09:08
makbi
thead {
background: #4D4D4D;
color: white;
font-weight: bold;
font-size: 20px;
text-align: center;
}
thead.table-header td {
text-align: center;
/*
Github is awesome!
Github issues are great, and there are many great tools to mange them,
but how do you manage them withoud tools.
Each issue could be connected with several labels so it would be easier to navigate through them.
Unfornatelly as for now, github doesn't offer any "save search" functionality
so we need to hack our way for better productivity.
This is how I do it,
@tzookb
tzookb / app.js
Created August 24, 2016 11:29
mixpanel in vue.js component
let componenet = require('./componenet');
Vue.app ( stuff );
//this code is packaged using browserify
@tzookb
tzookb / app.js
Last active October 9, 2016 12:11
let Vue = require('vue');
let serverConfig = require('./helpers/server-config');
require('./mixpanel-connector.js');
//bla bla
var mixpanel = require('mixpanel-browser');
mixpanel.init(MY_KEY);
let events = require('./../helpers/events');
events.on('agree_post', function(data) {
mixpanel.track('agree post', {
post_id: data.id,
created: getFormatedNowDate()
@tzookb
tzookb / sol.js
Created October 18, 2016 11:47
Chaser quick question
var data = [
{name: "xavier", rank: 2},
{name: "avi", rank: 5},
{name: "oz", rank: 1},
{name: "mom", rank: 1},
{name: "dad", rank: 3}
];
function rankOrder(data) {
return data.sort(function(a, b) {
FROM nginx:1.9-alpine
MAINTAINER Tomaz Zaman
RUN mkdir -p /var/www/html
WORKDIR /var/www/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY . ./