Skip to content

Instantly share code, notes, and snippets.

@aappddeevv
aappddeevv / examples-akka-server.md
Last active October 11, 2017 08:19
akka, http, server

A relatively simple akka server with a few bells and whistes.

package example

import scala.language._
import akka.actor._
import akka.http.scaladsl
import scaladsl._
@tony612
tony612 / install.sh
Last active December 1, 2018 17:58
Install Elixir/Erlang in 20 seconds in China
# 1.4 on ubuntu 14.04
wget https://mirrors.tuna.tsinghua.edu.cn/erlang-solutions/ubuntu/pool/esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
sudo dpkg -i esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
sudo apt-get -f -y install
sudo dpkg -i esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
wget https://mirrors.tuna.tsinghua.edu.cn/erlang-solutions/ubuntu/pool/elixir_1.4.1-1~ubuntu~trusty_all.deb
sudo dpkg -i elixir_1.4.1-1~ubuntu~trusty_all.deb
elixir -v
# 1.5 on ubuntu 14.04
@odoe
odoe / esritogeo.js
Created November 23, 2011 16:58
Convert ESRI-JSON to GeoJSON
var stripJSON = function(str) {
return str.replace(/\\n/g, "\\n")
.replace(/\\t/g, "\\t");
};
var jsonToObject = function(stringIn) {
var data;
try {
data = JSON.parse(stripJSON(stringIn));
console.log("json converted to object");
@jgornick
jgornick / docker-cleanup.sh
Created May 20, 2016 19:07
Docker: Cleanup (Remove all exited containers and dangling images)
#!/bin/bash
docker rm $(docker ps -q -f status=exited)
docker rmi $(docker images -q -f dangling=true)
@itsuwari
itsuwari / Install environment.sh
Last active July 25, 2022 17:01
Install openresty with Fancyindex
#!/bin/bash
#Install base pakages
sudo apt-get -y update && apt upgrade -y
sudo apt-get -y install ntpdate man man-db mtr ipset iperf3 dnsmasq python3-pip curl aria2 python3-lxml \
fuse build-essential git zip libpcre3-dev libevent-dev libssl-dev libcurl4-openssl-dev libgd-dev libgeoip-dev libpq-dev libxslt1-dev \
software-properties-common autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev libudns-dev pkg-config fakeroot devscripts \
autoconf libtool pkg-config python3-dev libssl-dev
sudo apt-get autoremove -y
# Update time
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@52cik
52cik / npm.taobao.sh
Last active February 29, 2024 02:56
npm 淘宝镜像配置
npm set registry https://r.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
npm set ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!