Skip to content

Instantly share code, notes, and snippets.

apt-get install build-essential g++ flex bison gperf ruby perl \
libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
libpng-dev libjpeg-dev python libx11-dev libxext-dev git
git clone git://github.com/orenyomtov/phantomjs.git
cd phantomjs
git checkout 2.1.1.1
git submodule init
git submodule update
@orenyomtov
orenyomtov / slack_rtl_support_mac.sh
Created April 18, 2018 12:07
Add RTL support for Slack on Mac
# Prerequisites: Node.js
# Node.js can be installed using brew (https://brew.sh/) by running:
# brew install node
sudo echo "Killing Slack"
kill -9 $(ps aux | grep 'Slack' | awk '{print $2}')
echo "Installing asar"
npm install -g asar
@orenyomtov
orenyomtov / fire-tv-disable-sleep-dark-screen-timeout.sh
Created June 27, 2018 13:01
Run this to disable your Fire TV from blacking out after 20 minutes
adb shell settings put secure sleep_timeout 0
@orenyomtov
orenyomtov / medium_follow_unfollow.js
Created October 2, 2018 19:28
For educational purposes only
//Follow all the users in the current Medium page
function filterNodeListByAttribute(nodeList, attributeName) {
let foundAttributeValues = []
return Array.prototype.slice.call(nodeList).filter(function(node) {
let attributeValue = node.getAttribute(attributeName)
return foundAttributeValues.indexOf(attributeValue) == -1 && foundAttributeValues.push(attributeValue)
})
}
filterNodeListByAttribute(document.querySelectorAll('*[data-action="toggle-subscribe-user"]:not(.is-active)'), 'data-action-value').forEach(subscribeButton => subscribeButton.click())
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/vegasbrianc/prometheus/version-2/pwd-stack.yml)
version: '3'
networks:
monitor-net:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
FROM golang:alpine
# Install dependencies
RUN apk update && apk add git make
# Install tools
RUN go get github.com/yudai/gotty
ENTRYPOINT ["gotty"]
version: '3.6'
services:
gotty:
image: pataquets/gotty
command: -w bash
ports:
- 8080
@orenyomtov
orenyomtov / update-gcc-clang-8-ubuntu-16.04-xenial.sh
Created March 31, 2019 12:42
Update clang to 8.0 and gcc to 8.0 on Ubuntu xenial 16.04
if [ ! -f /usr/bin/gcc-8 ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-8 g++-8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 1000
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 1000
fi
if [ ! -f /usr/bin/gcc-8 ]; then