Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 06:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@iBaozi
iBaozi / auto_update.md
Last active November 7, 2016 05:30
gitlab 自动发布

自动更新代码

功能

该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forumsbaozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull

部署

在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003

@52cik
52cik / address.js
Last active June 4, 2022 13:06
提取淘宝地址库
/**
* 提取淘宝地址库
*
* 用法:
* 1. 打开淘宝 https://www.taobao.com/
* 2. 将下面代码复制到控制台
* 3. 按回车
* 4. 复制输出的 json 数据保存到你的文件
*
* 仅支持: chrome 48+
@lilydjwg
lilydjwg / colorpicker.c
Created April 25, 2016 09:48
a simple colorpicker in GTK
//=====================================================================
// 拾取颜色并输出
// 返回值:
// 0 正常
// 1 被取消
// 2 语法错
//---------------------------------------------------------------------
#include<gtk/gtk.h>
#include<ctype.h>
//---------------------------------------------------------------------
@mine260309
mine260309 / gist:70da43f6799efb9277c12172c65f8940
Last active March 8, 2019 08:15
Permissions used in Alipay 9.6.6
APK is pulled from Nexus6p and dumped with `aapt dump permissions base.apk`
package: com.eg.android.AlipayGphone
uses-permission: name='com.alipay.permission.ALIPAY_UPDATE_CREDENTIALS'
uses-permission: name='com.android.launcher.permission.INSTALL_SHORTCUT'
uses-permission: name='android.permission.BLUETOOTH'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
uses-permission: name='android.permission.CAMERA'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.MODIFY_AUDIO_SETTINGS'
@582033
582033 / python
Last active November 29, 2020 15:41
多线程获取并验证代理
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re
import requests
import Queue
import threading
class Proxy():
def __init__(self, proxy_url, target_url, ver_keyword, timeout):
@andystanton
andystanton / JVM DNS TTL Policy.md
Last active November 15, 2022 08:17
A script that inspects the DNS TTL for a JVM in a supplied Docker image.

A script that inspects the DNS TTL for a JVM in a supplied Docker image. The image must also contain a JDK.

It does this by generating a Docker image containing a Java program that outputs the JVM's DNS TTL and executing this, then cleaning up the container, image and temporary files.

Usage

$ ./jvm-dns-ttl-policy.sh openjdk:8
@fasionchan
fasionchan / libco.py
Created August 31, 2020 07:39
一个精简的Python协程库,才100来行代码!
import select
from collections import deque
from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR
def create_listen_socket(bind_addr='0.0.0.0', bind_port=55555, backlogs=102400):
sock = socket(AF_INET, SOCK_STREAM)
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
sock.bind((bind_addr, bind_port))
sock.listen(backlogs)