Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
@bennycode
bennycode / dexie-auto-increment.html
Last active May 25, 2020 20:41
Auto incremental primary keys with Dexie
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="bower_components/dexie/dist/dexie.js"></script>
</head>
<body>
<script>

Looking for experienced web developers

Gizra is a 20+ person company, located in central Tel Aviv and US.

We work solely with Open Source technologies, some of our products are themselves released as Open Source. Our contributions help power websites like whitehouse.gov, The Economist, MSNBC and others. Among our clients are Harvard University, the European Commission and the UN.

It's important to us to work on interesting projects, with advanced technologies and clients who see us as partners. In particular we love projects that challenge us to figure out new stuff - technology and otherwise - and we look for people with a similar mindset.

Everyone at Gizra can code. We aim to hold ourselves to the highest coding standards and constantly seek better ways to do our work.

docker run --rm --name=ch -p=0.0.0.0:8484:8484 -p=0.0.0.0:2222:2222 \
-p=0.0.0.0:4444:4444 -p=0.0.0.0:5920:5900 \
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \
-e VNC_PASSWORD=hola -e WITH_GUACAMOLE=true \
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" \
elgalu/selenium:v2.46.0-base1
@CMCDragonkai
CMCDragonkai / parallel_curl.sh
Last active December 11, 2023 08:14
Bash: GNU Parallel with Curl
# do it once
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it twice
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it 4 times, but at 2 a time
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# you can also put all your commands into a file
@e0ipso
e0ipso / rest-performance
Last active August 29, 2015 14:10
REST modules performance comparison.
# Varnish caching
## List of 300 items
Requests per second: 6717.35 [#/sec] (mean) # RESTful Memcache render cache.
Requests per second: 7096.14 [#/sec] (mean) # RESTful Database render cache.
Requests per second: 6379.45 [#/sec] (mean) # RESTful No render cache.
Requests per second: 95.24 [#/sec] (mean) # RESTWS
Requests per second: 1125.62 [#/sec] (mean) # Services
## List of 50 items
Requests per second: 6632.03 [#/sec] (mean) # RESTful Memcache render cache.
Requests per second: 7057.74 [#/sec] (mean) # RESTful Database render cache.
@mrkelly
mrkelly / event.builder.js
Created August 6, 2014 19:44
Angular Logstash
angular.module('hf.events.builder', [
'app.resources',
'app.values'
])
.factory('EventBuilder', function ($injector, $window, apiUrl) {
var EventBuilder = function EventBuilder(message) {
this['@timestamp'] = new Date();
this['@message'] = message || '';
return this;
};
@vivien
vivien / imgur
Last active January 27, 2022 19:46
Shell script to upload image(s) to imgur.com
#!/bin/sh
#
# Upload image(s) to imgur.com
# Copyright (C) 2014 Vivien Didelot <vivien@didelot.org>
# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt
#
# Requires "jshon":
# http://kmkeen.com/jshon/
#
# Alternatives, which suck:
@egonSchiele
egonSchiele / diners.hs
Last active April 23, 2022 17:29
Dining philosophers solution in Haskell using STM. Taken from http://rosettacode.org/wiki/Dining_philosophers#Haskell with some minor modifications.
import Control.Monad
import Control.Concurrent
import Control.Concurrent.STM
import System.Random
import Text.Printf
-- Forks
type Fork = TMVar Int
newFork :: Int -> IO Fork
@RainerAtSpirit
RainerAtSpirit / JekyllApps.js
Created July 9, 2012 12:18
Adding AngularJS search in Jekyll blog
/**
* Setup Module with `highlight` filter
*/
var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(false);
});
JekyllApp.filter('highlight', function () {
return function (text, filter) {