Skip to content

Instantly share code, notes, and snippets.

View eiryu's full-sized avatar

eiryu eiryu

View GitHub Profile
@mala
mala / CVE-2018-0691.md
Last active October 15, 2018 01:37
CVE-2018-0691 プラスメッセージにおける証明書検証不備について

CVE-2018-0691 プラスメッセージにおける証明書検証不備について

  • https://jvn.jp/jp/JVN37288228/

  • 平日の業務時間内に見つけた問題である関係で(自分ルールで)所属を入れていますが、他社サービスに対する調査や報告は業務とは一切関係のない個人の活動として行っています。

  • 文責はmala個人にあります。お問い合わせなどありましたら個人宛にどうぞ。TwitterのDMや任意の文字列 @ma.la

概要

@qmchenry
qmchenry / enumCaseName.swift
Created April 21, 2017 18:07
Swift enum name string with associated values
// Swift enums cannot be declared with a rawValue if they have associated values
// like good ol' Amargasaurus has. Using String(describing: dino) on a case with
// associated also includes the values, but works fine on unassociated cases.
// Mirror(reflecting: dino) can extract the name of an associated case, but is
// nil for unassociated cases. Our hero ?? swoops in to save the day!
enum Sauropoda {
case Amargasaurus(things: Int64, hasOtherThing: Bool?)
case Antetonitrus
// ...
@iandundas
iandundas / xcode-downloader.rb
Created February 21, 2017 09:02
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
@voluntas
voluntas / shiguredo_development_policy.rst
Last active April 16, 2024 13:29
時雨堂を支える開発方針

現状と大きく変わったのでいったん削除しました。

import groovy.transform.ToString
class ResourceException extends Exception {
Object<?> object
ResourceException (Object<?> object) {
this.object = object
}
@Override String toString () {
return "${this.class} caused by ${object}." as String
}