Skip to content

Instantly share code, notes, and snippets.

@db0company
db0company / Markdown Cheat Sheet.md
Created December 3, 2015 19:45
Markdown cheat sheet

Bold text

Italic text

Link

Quote

Title (Works with 1 to 6 #, 1 is bigger, 6 is smaller)

@db0company
db0company / sukutomo_after_events.md
Last active March 7, 2016 23:03
Things to do in School Idol Tomodachi when an event is announced
  • At 11pm PST the day before the event starts (5th or 20th of each month in JP, unpredictable in EN) a notice is published to announce the new event
  • Take a screenshot of the banner
  • Open the notice, search for the lines in which it lists the various gifts you can get, the lines start with [R], [SR]
  • Open Google Translate or any other OCR app to read those lines, you'll get the name of the teacher card you can get.
  • In School Idol Tomodachi, filter cards by special & rarity, and search for the teacher whose name matches the one you OCR'd. Oh, you can also just compare the Japanese characters if you don't want to bother with OCR.
  • The attribute of the teacher (Smile, Cool, Pure) is the attribute of the SR of the event.
  • Send the full quality screenshot of the banner to your computer (for example Hangout will compress the picture - you don't want that!).
  • Roughly crop the banner, you can leave pink around the banner.
  • Download the imagemagick script "autotrim.sh" (just google it) and imagemagick if you

Total Lines

LamaWeb

Language files blank comment code
Javascript 5 34 16 1288
@db0company
db0company / appdelegate_notifications.swift
Last active March 7, 2016 23:04
Swift app delegate notifications
//
// AppDelegate.swift
// Life.
//
// Created by db0 on 7/11/14.
// Copyright (c) 2014 Rainbow Cookies. All rights reserved.
//
import UIKit
@db0company
db0company / font2png.sh
Created June 7, 2015 19:48
Convert characters in a font into png images. Requires imagemagick.
if [ $# -lt 3 ]
then
echo $0 'font characters color size'
exit 1
fi
font=$1
string=$2
color=$3
size=$4

Update documents

  1. Update documents with our design
  • Create a copy of the template
  • Rename it to the document
  • Remove all the content between Summary and the conclusion
  • Find the .docx latest version of the document with the cpo design
  • Open the docx with Google Docs to have an editable version
  • Copy all the content of the docx at the end of the new template document (and remove the generated document from the docx)
  • For each sentence, apply the style that corresponds to the type of the sentence.
@db0company
db0company / topMostViewController.swift
Created January 19, 2015 14:28
Get the top most viewController anywhere in the app (typically from the appDelegate). Get the current visible viewController.
extension UIViewController {
func topMostViewController() -> UIViewController {
if self.presentedViewController == nil {
return self
}
if let navigation = self.presentedViewController as? UINavigationController {
return navigation.visibleViewController.topMostViewController()
}
if let tab = self.presentedViewController as? UITabBarController {
if let selectedTab = tab.selectedViewController {
Ano desu ne, Araragi-san,
Kai to yu no wa buta wa yura nandesu yo
Futsu, utae no rueda kimite ireba indesu. Sotto da genjitsutoyu monodesu.
Shiranakia shiranai houhou wa ii koto nandesu yo.
Mushiro, kai o shiru koto de shiranai koto afueta dake no koto nan desuyo.
1) Do you have a physical or mental disorder; or are you a drug abuser or addict; or do you currently have any of the following diseases: *
Yes No
Chancroid
Gonorrhea
Granuloma Inguinale
Leprosy, infectious
Lymphogranuloma venereum
Syphilis, infectious
Active Tuberculosis
2) Have you ever been arrested or convicted for a crime that resulted in serious damage to property, or serious harm to another person or government authority? *
// Handle response with Alamofire
request.responseJSON { (request, response, data, error) in
switch (response, data) {
case (.Some(let response), .Some(let data)):
let json = JSON(data)
if response.statusCode >= 200 && response.statusCode < 300 {
verbose("API Success")
verbose("API Response: \(json)", level: 3)
return cbSuccess(json)