Skip to content

Instantly share code, notes, and snippets.

😀
Haha

vamdt vamdt

😀
Haha
Block or report user

Report or block vamdt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@weidagang
weidagang / distributed_mvcc_cross_row_transaction.py
Last active Oct 19, 2019
Distributed MVCC based cross-row transaction
View distributed_mvcc_cross_row_transaction.py
#!/usr/bin/python3.5
# Author: Dagang Wei (github.com/weidagang)
# Created: 2016-11-19
# Last modified: 2016-11-27
# License: MIT
# Self link: https://gist.github.com/weidagang/1b001d0e55c4eff15ad34cc469fafb84
#
# This code demonstrates the core algorithm for distributed MVCC based cross-row
# transactions. The algorithm is built on top of a distributed key-value database
View types.markdown

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@raphw
raphw / BootstrapAgent.java
Last active Oct 13, 2019
An example agent that intercepts a method of the bootstrap class loader.
View BootstrapAgent.java
package net.bytebuddy;
import net.bytebuddy.agent.ByteBuddyAgent;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.dynamic.ClassFileLocator;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.dynamic.loading.ClassInjector;
import net.bytebuddy.implementation.MethodDelegation;
import net.bytebuddy.implementation.bind.annotation.SuperCall;
View compile_time_regex.cc
template <typename Left, typename Right>
struct ConcatExpr;
template <typename Left, typename Right>
struct AltExpr;
template <typename SubExpr>
struct RepeatExpr;
template <char ch>
@oledid
oledid / turn-off-screen.ps1
Created Sep 24, 2015
PowerShell: Turn off computer screen
View turn-off-screen.ps1
# Source: http://www.powershellmagazine.com/2013/07/18/pstip-how-to-switch-off-display-with-powershell/
# Turn display off by calling WindowsAPI.
# SendMessage(HWND_BROADCAST,WM_SYSCOMMAND, SC_MONITORPOWER, POWER_OFF)
# HWND_BROADCAST 0xffff
# WM_SYSCOMMAND 0x0112
# SC_MONITORPOWER 0xf170
# POWER_OFF 0x0002
View pse-p4.11.md

Let's solve the following physics problem using Symbolism, a computer algebra library for C#.

One strategy in a snowball fight is to throw a first snowball at a high angle over level ground. While your opponent is watching the first one, you throw a second one at a low angle and timed to arrive at your opponent before or at the same time as the first one.

Assume both snowballs are thrown with a speed of 25.0 m/s.

The first one is thrown at an angle of 70.0° with respect to the horizontal.

View 浅谈《【原创】深度分析Twitter Heron》.md

浅谈《【原创】深度分析Twitter Heron》

有幸拜读了《【原创】深度分析Twitter Heron》 ( http://www.longda.us/?p=529 )一文,十分感动国内社区对Heron的关注。但此文中有诸多重要问题值得商榷,我谨在此行文指出,还望能够帮助大家更好的理解Heron。转载烦请注明出处:https://gist.github.com/maosongfu/c3aeb1bb5eb7b39fcdc5

我是符茂松,目前在Twitter工作,是Heron的作者之一。这个领域水深,我也是初窥门径,希望能够与大家多多交流。

微博:符茂松

Twitter: Louis_Fumaosong

@wong2
wong2 / cmds.txt
Last active May 30, 2019
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
View cmds.txt
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@jorinvo
jorinvo / challenge.md
Last active Apr 3, 2018
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.
View challenge.md

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@evi1m0
evi1m0 / PicConverText.py
Last active Mar 15, 2019
12306 新版验证码识别脚本 (已失效)
View PicConverText.py
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
# website=linux.im
'''
12306 Captcha Picture:
author: Evi1m0@20150316
1. Download Captcha
2. Pic Conver Text
You can’t perform that action at this time.