Skip to content

Instantly share code, notes, and snippets.

Avatar

Sébastien Duperron Liquidsoul

View GitHub Profile
View keybase.md

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 Apr 14, 2017
A fastlane action for `pmd cpd` to use for objective-C
View pmd_cpd.rb
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)
View fonts-enum.stencil
// 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 Dec 15, 2020
A Sourcery template to generate a default initializer in your `struct`s (working in version 0.8.0)
View AutoInit.stencil
{% 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}} }