Skip to content

Instantly share code, notes, and snippets.

Marcos Nils marcosnils

Block or report user

Report or block marcosnils

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcosnils
marcosnils / RequestTest.js
Last active Dec 17, 2015
Request performance test.
View RequestTest.js
var request = require("request"),
http = require("http");
var time;
var plainBody = {"resource":"/test/1111111111111","user_id":15667236,"topic":"test","attempts":1,"sent":"2013-05-27T19:15:17.043Z","received":"2013-05-27T19:15:15.000Z"}
var body = JSON.stringify(plainBody);
View tmate.sh
#!/bin/bash
set -e
SLACK_WEBHOOK_URL=
DEFAULT_EMOJI=:slack:
CHANNEL=${1:-#general}
AUTHOR="Some user"
tmate -S /tmp/tmate.sock new-session -d && tmate -S /tmp/tmate.sock wait tmate-ready
View gist:af51f2a4a43ed4ffe1b4
ubuntu@box1302:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
microcode : 0x70b
cpu MHz : 2600.080
cache size : 20480 KB
View vim8 dockerfile
FROM ubuntu:wily
RUN apt-get update && apt-get build-dep -y vim && apt-get install -y git
RUN apt-get install -y python3-dev
RUN git clone --depth=1 -b v8.0.0045 https://github.com/vim/vim.git \
&& cd vim \
&& ./configure --with-features=huge --enable-gui=gtk3 --with-x --enable-gtk3-check --enable-athena-check --enable-fontset --with-python3-config-dir=$(python3-config --configdir) --enable-pythoninterp --enable-python3interp --enable-rubyinterp \
&& make && mkdir /pkg && DESTDIR=/pkg make install
@marcosnils
marcosnils / gist:b119d7325c469de5175bc8a2571448c1
Created Apr 12, 2017 — forked from freshjones/gist:b0713263033df8cc9f44
bash script to monitor and do something with docker events
View gist:b119d7325c469de5175bc8a2571448c1
#!/bin/sh
docker events --filter 'event=start' --filter 'event=stop' | while read event
do
container_id=`echo $event | sed 's/.*Z\ \(.*\):\ .*/\1/'`
echo $container_id
View gist:2673c34c2fec50019502199fb7d28a61
param([string]$DTR_URL)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
invoke-webrequest -uri "https://$DTR_URL/ca" -o c:\ca.crt
$cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 c:\ca.crt
$store = new-object System.Security.Cryptography.X509Certificates.X509Store('Root','localmachine')
View keybase.md

Keybase proof

I hereby claim:

  • I am marcosnils on github.
  • I am marcosnils (https://keybase.io/marcosnils) on keybase.
  • I have a public key ASC8GTDtXlulbviZaCTuRjnp6-8SpJfRkG6i-bj2pWyDDwo

To claim this, I am signing this object:

View pwd-vnc.yml
version: '3'
services:
ide:
image: psharkey/eclipse:latest
environment:
- DISPLAY=novnc:0.0
depends_on:
- novnc
networks:
- x11
@marcosnils
marcosnils / Dockerfile
Last active Feb 23, 2018
Dockerfile to run selenium headless tests
View Dockerfile
FROM debian:jessie
RUN apt update && apt install -y firefox-esr \
&& wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz \
&& tar -C /usr/bin/ -xvf geckodriver-v0.19.1-linux64.tar.gz && rm geckodriver-v0.19.1-linux64.tar.gz \
&& wget https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-60.0a1.en-US.linux-x86_64.tar.bz2 \
&& tar -C /opt/ -xvf firefox-60.0a1.en-US.linux-x86_64.tar.bz2 \
&& rm /usr/bin/firefox && ln -s /opt/firefox/firefox /usr/bin/firefox
View tsplit.sh
#!/bin/bash
# tsplit
# @marcosnils
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$ARGS" ]; then
You can’t perform that action at this time.