Skip to content

Instantly share code, notes, and snippets.

View imavroukakis's full-sized avatar

Ioannis Mavroukakis imavroukakis

View GitHub Profile
@vladikoff
vladikoff / resource.js
Created April 17, 2014 17:52
Angular $resource and transformResponse
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},

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

@stonehippo
stonehippo / FTDI_Basic_Hookup_for_ESP-01.jpg
Last active January 6, 2022 14:09
Notes on using the ESP8266 with the Arduino IDE
FTDI_Basic_Hookup_for_ESP-01.jpg
@rponte
rponte / get-latest-tag-on-git.sh
Last active December 9, 2024 00:27
Getting latest tag on git repository
# 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
@akirakw
akirakw / parallel-test-gradle.jenkins
Last active August 15, 2019 21:39
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
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') {
@pkmafia
pkmafia / De-Vonage HT701 Instructions.txt
Created April 3, 2016 22:50
De-Vonage HT701 Instructions
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
@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

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:

@angela-d
angela-d / gpg-key-migration.md
Created April 1, 2018 23:57
Move GPG Keys from One Machine to Another

Migrate GPG Keys from One Workstation to Another

Replace [your key] with your key ID

To obtain your key ID

gpg --list-secret-keys --keyid-format LONG

Which returns something like

[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