Skip to content

Instantly share code, notes, and snippets.

@Villanuevand
Villanuevand / README-español.md
Last active Dec 4, 2020
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2
View README-español.md

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@phoenixg
phoenixg / header_http_status_codes.php
Created Apr 6, 2013
PHP header() for sending HTTP status codes
View header_http_status_codes.php
<?php
/*
参考自:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function
http://snipplr.com/view/68099/
*/
function HTTPStatus($num) {
$http = array(
@ottosch
ottosch / fork-helper.py
Last active Dec 4, 2020
A script to help using ymgve's bitcoin_fork_claimer script
View fork-helper.py
#!/usr/bin/env python
# This script is meant to be used with bitcoin_fork_claimer: https://github.com/ymgve/bitcoin_fork_claimer
# The outputs of this script are the inputs to that script.
# Python 2.x is required
import urllib2
import json
import sys
import collections
@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active Dec 4, 2020
Fail2ban Config with Nginx and SSH
View filter.d_nginx-auth.conf
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =
@kerryrodden
kerryrodden / .block
Last active Dec 4, 2020
Sequences sunburst (d3 v4)
View .block
license: apache-2.0
@JeOam
JeOam / Animation.md
Last active Dec 4, 2020
iOS Core Animation: Advanced Techniques, Part 1: The Layer Beneath
View Animation.md

Author: https://www.cyanhall.com/

1. The Layer Tree

Core Animation's original name is Layer Kit

Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.

In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer. The only major feature of UIView that isn’t handled by CALayer is user interaction.

There are four hierarchies, each performing a different role:

@aw
aw / explain.md
Last active Dec 4, 2020
[SOLVED] Proxmox VE and cloud-init snippets etc
View explain.md

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)
You can’t perform that action at this time.