Skip to content

Instantly share code, notes, and snippets.

View Liquidsoul's full-sized avatar

Sébastien Duperron Liquidsoul

View GitHub Profile
@Liquidsoul
Liquidsoul / keybase.md
Created August 15, 2016 19:51
Keybase proof

Keybase proof

I hereby claim:

  • I am liquidsoul on github.
  • I am liquidsoul (https://keybase.io/liquidsoul) on keybase.
  • I have a public key ASA7O7kFuqsMfD73NsQw2Rb-ORaEnWY34L4I-GmbXJh4Bwo

To claim this, I am signing this object:

@Liquidsoul
Liquidsoul / pmd_cpd.rb
Created April 14, 2017 09:29
A fastlane action for `pmd cpd` to use for objective-C
module Fastlane
module Actions
module SharedValues
PMD_CPD_OUTPUT_FILE = :PMD_CPD_OUTPUT_FILE
PMD_CPD_ISSUES_COUNT = :PMD_CPD_ISSUES_COUNT
end
class PmdCpdAction < Action
def self.run(params)
raise "'pmd' not found in your PATH. It can be installed using 'brew install pmd'".red unless (`which pmd` and $?.to_i == 0)
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
{% if families %}
#if os(OSX)
import AppKit.NSFont
typealias Font = NSFont
#elseif os(iOS) || os(tvOS) || os(watchOS)
import UIKit.UIFont
typealias Font = UIFont
#endif
@Liquidsoul
Liquidsoul / AutoInit.stencil
Last active March 15, 2023 08:02
A Sourcery template to generate a default initializer in your `struct`s (working in version 0.8.0)
{% for type in types.structs %}
{% if type|annotated:"AutoInit" %}
{% set spacing %}{% if type.parentName %} {% endif %}{% endset %}
{% map type.storedVariables into parameters using var %}{{ var.name }}: {{ var.typeName }}{% endmap %}
// sourcery:inline:auto:{{ type.name }}.AutoInit
{{spacing}} {{ type.accessLevel }} init({{ parameters|join:", " }}) { // swiftlint:disable:this line_length
{{spacing}} {% for variable in type.storedVariables %}
{{spacing}} self.{{ variable.name }} = {{ variable.name }}
{{spacing}} {% endfor %}
{{spacing}} }