git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Shuffle iSay | |
// @namespace https://www.douban.com/people/MoNoMilky/ | |
// @version 0.2 | |
// @description Your brain is strange and strong, interesting. | |
// @author Bambooom | |
// @match https://*.douban.com/* | |
// @grant none | |
// ==/UserScript== |
Obfuscation isn't difficult in most programming languages. It's why we have "good practices" because it is so easy to hide what you mean in badly written code.
Obfuscation tends to be even easier in dynamic languages because of how forgiving they tend to be - and because they tend to give you direct access to the environment so that you can manipulate it.
Today, for fun, I'm going to obfuscate this code:
def _(n):
if n <= 0:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: Build | |
runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Implements the Poseidon permutation: | |
Starkad and Poseidon: New Hash Functions for Zero Knowledge Proof Systems | |
- Lorenzo Grassi, Daniel Kales, Dmitry Khovratovich, Arnab Roy, Christian Rechberger, and Markus Schofnegger | |
- https://eprint.iacr.org/2019/458.pdf | |
Other implementations: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Single Responsibility Principle | |
“…You had one job” — Loki to Skurge in Thor: Ragnarok | |
A class should have only one job. | |
If a class has more than one responsibility, it becomes coupled. | |
A change to one responsibility results to modification of the other responsibility. | |
""" | |
class Animal: | |
def __init__(self, name: str): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use actix_service::{Service, Transform}; | |
use actix_web::{dev::ServiceRequest, dev::ServiceResponse, Error}; | |
use futures::future::{ok, FutureResult}; | |
use futures::{Future, Poll}; | |
use slog::info; | |
// There are two step in middleware processing. | |
// 1. Middleware initialization, middleware factory get called with | |
// next service in chain as parameter. | |
// 2. Middleware's call method get called with normal request. |
Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.
- at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
- check
nginx -V
for the following:... TLS SNI support enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MySQL 5.6 client libraries | |
# https://launchpad.net/ubuntu/xenial/amd64/libmysqlclient-dev/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-client-5.6/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-client-core-5.6/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-common/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/libmysqlclient18/5.6.28-1ubuntu3 | |
# DEPRECATED https://launchpad.net/ubuntu/xenial/amd64/libdbd-mysql-perl/4.033-1 |