Skip to content

Instantly share code, notes, and snippets.

View andresilvagomez's full-sized avatar

Andres Silva andresilvagomez

View GitHub Profile
@andresilvagomez
andresilvagomez / Default (Dark).xccolortheme
Created June 6, 2018 18:20
Dark Xcode from Xcode 10
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@andresilvagomez
andresilvagomez / Fonts.swift
Created April 27, 2018 05:01 — forked from khanlou/Fonts.swift
Print all fonts in Swift 3
UIFont.familyNames.forEach({ familyName in
let fontNames = UIFont.fontNames(forFamilyName: familyName)
print(familyName, fontNames)
})
@andresilvagomez
andresilvagomez / SoftDeletes.js
Last active August 3, 2023 18:08
Soft deletes for Adonis 4.
// $ adonis make:trait SoftDeletes
class SoftDeletes {
register(Model, customOptions = {}) {
const deletedAtColumn = customOptions.name || `${Model.table}.deleted_at`;
Model.addGlobalScope(builder => {
builder.whereNull(deletedAtColumn);
}, 'adonis_soft_deletes');