Skip to content

Instantly share code, notes, and snippets.

View limboinf's full-sized avatar
🎯
Focusing

limbo limboinf

🎯
Focusing
View GitHub Profile
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@dreamsparkx
dreamsparkx / More-links.txt
Last active April 2, 2024 04:09
Install Apache, PHP, MySQL and phpMyAdmin on Mac OS X
@syfun
syfun / async-mysql.py
Created July 1, 2017 04:17
python async mysql redis http
import asyncio
import aiomysql
from aiomysql.cursors import DictCursor
class MysqlWrapper:
def __init__(self, host, port, user, password, db):
self.host = host
self.port = port
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@rmoff
rmoff / 00 run.sh
Created July 20, 2016 16:01
Flume config : Kafka -> HDFS
Make sure HDFS libraries are available in CLASSPATH, otherwise this won't work.
flume-ng agent --name target_agent --conf /opt/apache-flume-1.6.0-bin/conf/ --conf-file /home/rmoff/config/flume-kafka-twitter.conf
With debug:
flume-ng agent --name target_agent --conf /opt/apache-flume-1.6.0-bin/conf/ --conf-file /home/rmoff/config/flume-kafka-twitter.conf -Dflume.root.logger=DEBUG,console
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active May 14, 2024 02:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

# -*- coding:utf-8 -*-
from tornado.ioloop import IOLoop
from tornado.web import RequestHandler, Application
class MiddleWare(object):
def process_request(self, handler):
pass
def process_response(self, handler):
pass
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@cboettig
cboettig / docker-compose.yml
Last active December 31, 2023 15:23
debugging NGINX configuration for Jupyter
jupyter:
image: jupyter/datascience-notebook
environment:
- PASSWORD=${PASSWORD}
nginx:
image: nginx
links:
- jupyter
@zjhiphop
zjhiphop / 分布式系统学习资料.md
Created July 23, 2015 06:13
分布式系统学习资料

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.