Skip to content

Instantly share code, notes, and snippets.

View ameliaikeda's full-sized avatar
💜
probably drinking tea

Amelia Wylie ameliaikeda

💜
probably drinking tea
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ameliaikeda on github.
  • I am ameliaikeda (https://keybase.io/ameliaikeda) on keybase.
  • I have a public key ASA82rPStopBogJfuaI9hyn4FKVxvdkDRe-wBVwzr_uQUAo

To claim this, I am signing this object:

<?php
/**
* @author Lemmy
*/
class OsuAPI
{
const API_URL = "https://osu.ppy.sh/api/";
/**
{
"listeners": 193,
"start_time": 1426334364,
"end_time": 1426334581,
"thread": "https://meguca.org/a/600367",
"last_played": [
{
"id": 77354,
"song": "Dave Mc Loud - Mikado"
}
@ameliaikeda
ameliaikeda / coding-style.md
Last active August 29, 2015 14:18
PHP Coding Style Guide

PHP Style Guide

Firstly: follow [PSR-1][psr1], [PSR-2][psr2] and [PSR-4][psr4] strictly.

4 spaces instead of tabs. \n for newlines.

Specific Rules

Properties

From acb90d7c078f4554c20b55547ff8578bf8b468fd Mon Sep 17 00:00:00 2001
From: Amelia Ikeda <[email protected]>
Date: Wed, 11 Mar 2015 12:11:04 +0000
Subject: [PATCH] Allow using -iter count with pkcs8
---
apps/pkcs8.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
#!/bin/bash
# Use homebrew openssl, because it's built from source and up-to-date
openssl="$(brew --prefix openssl)/bin/openssl"
comment="Full Name <[email protected]>"
path="${HOME}/.ssh/id_rsa"
# Generate a 4096bit RSA key. Don't give me any bullshit about 2048 being fine. It isn't.
key=$($openssl genrsa 4096 2> /dev/null)
@ameliaikeda
ameliaikeda / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ameliaikeda
ameliaikeda / nginx.conf
Created October 27, 2014 12:08
nginx config for dynamic subdomain:subdirectory mapping
user ameliaikeda staff;
worker_processes 2;
error_log /Users/ameliaikeda/dev/error.log info;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
[21:54:02] amelia::amelia ➜ ~
» cat /etc/nginx/conf.d/* 1 ↵
# remove SSL completely; use TLS
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# prefer our ciphers, clients requesting something else will
# be told to sod off and pick something from our list
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+HIGH+AES:EDH+HIGH+AES:!PSK:!SRP:!aNULL;
@ameliaikeda
ameliaikeda / TagTrait.php
Created September 12, 2014 02:41
For being such a messy library, this is actually quite clean...
<?php
use GetId3\Write\Id3v2 as TagWriter;
trait TagTrait {
public function writeTags(Track $song = null) {
if (is_null($song)) $song = $this;
$writer = new TagWriter;