Skip to content

Instantly share code, notes, and snippets.

Ioannis Mavroukakis imavroukakis

View GitHub Profile
View Elasticsearch Service with Jemalloc LD PRELOAD
[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
RuntimeDirectory=elasticsearch
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
@alekseykulikov
alekseykulikov / index.md
Last active Jul 4, 2020
Principles we use to write CSS for modern browsers
View index.md

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

View De-Vonage HT701 Instructions.txt
De-Vonage HT701 Basictalk HT701:
Set up a separate router to serve DHCP addresses with NO internet access.
Set it for something different from my main router to eliminate confusion;
This example one is made with ip address 192.168.2.1
Connect a phone to check IP address. Dial *** Then 02
Log on and use password ERgTbCLo
Go to advanced tab and make admin password admin
Clear Vonage firmware boxes
Check Always Skip the Firmware Check
View Java.md
@akirakw
akirakw / parallel-test-gradle.jenkins
Last active Aug 15, 2019
An example script of parallel test on Jenkins Workflow Plugin with Gradle project, based on plugin tutorial: https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#creating-multiple-threads
View parallel-test-gradle.jenkins
node('remote') {
git url: 'https://github.com/akirakw/parallel-test-executor-plugin-sample.git' , branch: 'wip/gradle'
stash excludes: 'target/, build/', includes: '**', name: 'source'
}
def splits = splitTests([$class: 'CountDrivenParallelism', size: 2])
def branches = [:]
for (int i = 0; i < splits.size(); i++) {
def exclusions = splits.get(i);
branches["split${i}"] = {
node('remote') {
@rponte
rponte / get-latest-tag-on-git.sh
Last active Aug 5, 2020
Getting latest tag on git repository
View get-latest-tag-on-git.sh
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
View README.md

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow 3G -l 600ms -p 10%   # slow network on eth0 and setup latency to 600ms packetloss to 10%
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default
@vladikoff
vladikoff / resource.js
Created Apr 17, 2014
Angular $resource and transformResponse
View resource.js
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

You can’t perform that action at this time.