Skip to content

Instantly share code, notes, and snippets.

@evanslify
evanslify / convert.py
Created May 7, 2016 10:06
Snippet conversion from UltiSnips to Atom.
#!/usr/bin/env python
# encoding: utf-8
import re
import sys
def split_snippets(raw_string):
"""Split UltiSnip snippets to lists.
/*
* author: es <es@evsfy.com>
* description:
* This script helps you battle with Allpay's CheckMacValue.
*/
const crypto = require('crypto');
String.prototype.allpayURLencode = function() {
var replace_map = {
' ': '+',
@evanslify
evanslify / kktix-clicker.js
Created July 9, 2016 04:43
This scripts helps you buy tickets on KKTIX by bypassing the alert box, and saves your mouse button / keyboard from overusing.
window.alert = function() {
console.log('alert');
};
var btn = $('#registrationsNewApp > div > div:nth-child(5) > div.form-actions.plain.align-center > button');
setInterval(function () {btn.click();}, 1000);
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@evanslify
evanslify / bash_prompt.sh
Created October 19, 2016 07:26 — forked from blaze33/bash_prompt.sh
Set color bash prompt according to active virtualenv, git branch, mercurial branch and return status of last command. I won't maintain this fork anymore as I reused this script here: https://github.com/blaze33/effings
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the branch/status of the current mercurial repository
# * the return value of the previous command
#
const performance = require('perf_hooks').performance
const cluster = require('cluster');
const http = require('http');
const numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
for (let i = 0; i < numCPUs; i++) {
cluster.fork()
}
} else {

Keybase proof

I hereby claim:

  • I am evanslify on github.
  • I am evanslify (https://keybase.io/evanslify) on keybase.
  • I have a public key whose fingerprint is 4D39 117A 15CE 8864 471E 6C93 9A9E 08BA E30B 3605

To claim this, I am signing this object:

@evanslify
evanslify / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Created April 8, 2018 06:23
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@evanslify
evanslify / s3_multipart_upload.py
Created August 22, 2018 08:15 — forked from fabiant7t/s3_multipart_upload.py
Parallel S3 multipart upload with retries
import logging
import math
import mimetypes
from multiprocessing import Pool
import os
from boto.s3.connection import S3Connection
from filechunkio import FileChunkIO
@evanslify
evanslify / s3_multipart_upload.py
Last active August 22, 2018 16:55 — forked from teasherm/s3_multipart_upload.py
boto3 S3 Multipart Upload
import argparse
import os
import boto3
from botocore.exceptions import ClientError
class S3MultipartUpload(object):
# AWS throws EntityTooSmall error for parts smaller than 5 MB
PART_MINIMUM = int(5e6)