Skip to content

Instantly share code, notes, and snippets.

Avatar
🙊
made you look

andreas andreasvirkus

🙊
made you look
View GitHub Profile
View .tmux.conf
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g prefix C-x
unbind-key C-x
bind-key C-2 send-prefix
bind \ split-window -h -c '#{pane_current_path}'
bind / split-window -v -c '#{pane_current_path}'
# Copy-paste integration
@Marak
Marak / base64.js
Created Feb 8, 2011
An extremely simple implementation of base64 encoding / decoding using node.js Buffers
View base64.js
/*
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers
*
* (C) 2010, Nodejitsu Inc.
*
*/
var base64 = exports;
base64.encode = function (unencoded) {
@user9384732902
user9384732902 / cert-manager-nginx-ingress-gke-recipe.md
Last active Feb 14, 2020
A quickstart guide to deploying cert-manager and nginx-ingress on GKE
View cert-manager-nginx-ingress-gke-recipe.md

This is a quick recipe for deploying cert-manager and nginx-ingress on GKE to obtain SSL certificates from Lets Encrypt. Whilst this recipe is designed for Google Cloud Platform, it can easily be adapted for other cloud platforms.

We'll begin with a Kubernetes cluster, and we'll obtain authentication credentials.

gcloud container clusters get-credentials my-test-app
kubectl config current-context
kubectl get nodes
@thom-nic
thom-nic / Dockerfile
Created Jun 18, 2014
Node.js Dockerfile based on ubuntu 14.04. This is a little smaller than dockerfile/nodejs which depends on python
View Dockerfile
# Node.js app Docker file
FROM ubuntu:14.04
MAINTAINER Thom Nichols "thom@thomnichols.org"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
@theodorosploumis
theodorosploumis / Install_Phpstorm.sh
Last active Apr 10, 2020
Update phpstorm on Ubuntu linux.
View Install_Phpstorm.sh
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
# For stable releases try: https://data.services.jetbrains.com/products/download?code=PS&platform=linux
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
@jakecobley
jakecobley / .browserslistrc
Last active Apr 29, 2020
Browserslist configuration explicitly targeting modern browsers.
View .browserslistrc
last 2 ChromeAndroid versions
last 2 Chrome versions
last 2 iOS versions
last 2 Safari versions
last 2 Samsung versions
last 2 FirefoxAndroid versions
last 2 Firefox versions
@multidis
multidis / Dockerfile
Last active May 23, 2020
Cron job scheduling inside a Docker container.
View Dockerfile
# phusion baseimage initiates cron properly
# Use phusion/baseimage as base image. To make your builds reproducible, make
# sure you lock down to a specific version, not to `latest`!
# See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for
# a list of version numbers.
FROM phusion/baseimage:0.9.16
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
@gfreezy
gfreezy / .slate.js
Last active May 25, 2020
slate configuration
View .slate.js
var pushRight = slate.operation("push", {
"direction": "right",
"style": "bar-resize:screenSizeX/2"
});
var pushLeft = slate.operation("push", {
"direction": "left",
"style": "bar-resize:screenSizeX/2"
});
@christiangenco
christiangenco / download website assets
Created Jan 20, 2014
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
View download website assets
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
View PreventGhostClick.js
/**
* Prevent click events after a touchend.
*
* Inspired/copy-paste from this article of Google by Ryan Fioravanti
* https://developers.google.com/mobile/articles/fast_buttons#ghost
*
* USAGE:
* Prevent the click event for an certain element
* ````
* PreventGhostClick(myElement);