Skip to content

Instantly share code, notes, and snippets.

@lae
lae / dr-provision-tasks.yml
Last active April 17, 2018 19:22
dr-provision ansible role (tasks file only)
---
# tasks file for provision
- name: Install necessary packages for DR Provision
apt:
name: "{{ item }}"
state: latest
update_cache: yes
with_items:
- unzip
- p7zip-full
#!/bin/bash
for certificate in certs/*; do
expiration_date=$(openssl x509 -noout -dates -in $certificate | grep -oP "(?<=notAfter=).*")
remaining_validity_seconds=$(($(date -d "$expiration_date" +%s) - $(date +%s)))
remaining_validity_in_days=$(($remaining_validity_seconds / 86400))
if [ $remaining_validity_in_days -lt 30 ]; then
echo $(basename $certificate .pem);
fi
done

Monacoin activates SegWit

first published on Core Media on 2017.04.27

The first cryptocurrency developed in Japan, Monacoin, has surpassed the SegWit activation threshold.

Born from the depths of 2ch, Japan's most popular text board, in the December of 2013, the Monacoin community has become the backbone of the cryptocurrency community in Japan. As a result of SegWit's activation, hopes for further developments, including some off-chain solutions, are beginning to rise within the Monacoin community.

Moreover, the perception of cryptocurrency by the Japanese public is gradually improving, thanks to the involvement of big businesses and the Financial Services Agency. Now that there are proper venues for registration, cryptocurrencies can be officially recognized by the government, which helps to significantly reduce the barrier to entry to crypto for Japanese developers. With this combination of new and existing crypto develope

@lae
lae / configuration.py
Last active June 13, 2017 22:30
Looping through Ansible/YAML dict for Django configuration
# Ansible managed
DATE_FORMAT = "N j, Y"
BANNER_BOTTOM = "Your banner text"
LOGIN_REQUIRED = True
MAX_PAGE_SIZE = 500
PREFER_IPV4 = False
PAGINATE_COUNT = 100
BASE_PATH = "netbox/"
TIME_ZONE = "UTC"
ADMINS = [
@lae
lae / disable-twitter-previews.css
Created April 27, 2017 15:09
hides media on twitter behind spoiler text
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
.js-media-container,
.AdaptiveMedia {
display: none;
}
.permalink-tweet .AdaptiveMedia,
.permalink-tweet .js-media-container {
display: block;
@lae
lae / kirakiratter.css
Last active April 15, 2017 05:53
Kirakiratter Stylesheet for Mastodon
/* Mastodon: Kirakiratter Custom CSS V7.1
By Salil Gupta (@MasterDalK)
Other Contributors: @pomo, @sumire, @bitmap, @hisagi, @lae
Feature Requests & Bug Reports: #kktCSS on kirakiratter.com
使用方法: http://qiita.com/emerald_magic/items/27d233870e04d791fe2b
For use on Mobile (EN): https://kirakiratter.com/@bitmap/4076
For Desktop use: Same as above or use extension "Stylish". Tested to work in Chrome/Opera/Vivaldi/Firefox/Safari.
There are some toggles at the top, if you would like to disable them just comment as needed.
@lae
lae / monacoin.txt
Last active April 2, 2017 08:42
[ANN][MONA] Monacoin LAUNCHING 2014/01/01 0:00 GMT
[center][img]http://i.imgur.com/HcUPhE3.png[/img]
[size=15pt]http://monacoin.org/en/[/size]
[b][color=blue][size=15pt]Specifications[/size][/color][/b]
Algorithm: Lyra2REv2 (originally Scrypt until block 450000)
Premine: none
Block reward: 50 MONA
Block time: 1.5 minutes
Retarget: 1 block (Dark Gravity Wave algorithm, hard fork at block 450000)
#!/usr/bin/python
import requests
import re
import sys
from collections import Counter
if len(sys.argv) < 2:
sys.exit("usage: python {} player-id".format(sys.argv[0]))
ranking_pl = requests.get("http://arcturus.su/tenhou/ranking/ranking.pl?name={}".format(sys.argv[1]))
127.0.0.1 localhost
127.0.1.1 host-one.example.invalid host-one
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# BEGIN ANSIBLE MANAGED: Proxmox Cluster Hosts
10.100.100.101 host-one.example.invalid host-one
10.100.100.102 host-three.example.invalid host-two
extern crate rusqlite;
use rusqlite::Connection;
#[derive(Debug, Copy, Clone)]
enum Trigger {
Note,
Combo,
Perfect,
Missing