Skip to content

Instantly share code, notes, and snippets.

Linus Oleander oleander

Block or report user

Report or block oleander

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a6202d8c2068f14ea490f00781163ea6
main.swift:55:7: error: ambiguous reference to member 'init'
self.init(x)
^~~~
Swift.Array<Element>:49:12: note: found this candidate
public init<S>(_ s: S) where S : Sequence, S.Iterator.Element == Element
^
Swift.RangeReplaceableCollection:22:24: note: found this candidate
public convenience init<S>(_ elements: S) where S : Sequence, S.Iterator.Element == Self.Iterator.Element
@oleander
oleander / Makefile
Created Apr 6, 2017
How to use the Swift Package Manager and CocoaPods within the same XCode application
View Makefile
APP="MyApp"
CONSTRUCT=xcodebuild -workspace $(APP).xcworkspace -scheme $(APP) clean
install_deps:
pod install
create_config:
swift package fetch
swift package generate-xcodeproj
wipe:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
View ironman.md
  • Ta med
    • Tävling
      • Simning
        • Våtdräkt
        • Simglasögon
      • Cykel
        • Vattenflaskor
        • Kolsyrepatroner
        • Kolsyrepump
        • Cykelskor
View gist:5343a5518526ab29fe84
  • Google Maps
  • Sverigekarta
  • Cykling
    • 1102km
      • 276km
        • Umeå -> Sundsvall, 276km
      • 289km
        • Sundsvall -> Bollnäs, 169km
        • Bollnäs -> Falun, 120km
      • 184km
View gist:b63c88b9ddd5275e404e
Handler/Comment.hs:25:29:
Couldn't match type `Text' with `Entity Post'
Expected type: Field (HandlerT App IO) (Entity Post)
Actual type: Field (HandlerT App IO) Text
In the first argument of `areq', namely `textField'
In the second argument of `(<$>)', namely
`areq textField "Post" (Just post)'
In the second argument of `(<*>)', namely
`(entityKey <$> areq textField "Post" (Just post))'
View gist:12b58c501871d64d1153
Handler/Comment.hs:25:29:
Couldn't match type `Text' with `Entity Post'
Expected type: Field (HandlerT App IO) (Entity Post)
Actual type: Field (HandlerT App IO) Text
In the first argument of `areq', namely `textField'
In the second argument of `(<$>)', namely
`areq textField "Post" (Just post)'
In the second argument of `(<*>)', namely
`(entityKey <$> areq textField "Post" (Just post))'
View gist:21b57c821f6706f512e5
require "pp"
a = "A\s+(.+?)"
b = "[\n]+B\s+(.+?)"
c = "[\n]+C\s+(.+?)"
d = "[\n]+D\s+((?=E)[^E]+|[^\n]+)"
e = "[(?=[\n]+E\s+)[\n]+E\s+(.+?)\n]?"
pp File.read("ord.txt").scan(/(^\d{1,2})\.\s+(.+?(?=A\s+))#{a}#{b}#{c}#{d}#{e}/m).to_a
View gist:4dfd8dbfdd7678e99276
ActionView::MissingTemplate: Missing template mobile/toplists/index, mobile/application/index, application/index with {:locale=>[:sv, :en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :slim, :coffee, :arb, :haml, :rabl]}. Searched in: * "/opt/www/radiofy.se/releases/20140604094919/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/twitter-bootstrap-rails-2.2.8/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/bundler/gems/active_admin-bca806aa816c/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/devise-3.2.4/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/bootstrap-kaminari-views-0.0.3/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/bundler/gems/kaminari-30215b19f1c5/app/views"
View gist:6502454
SELECT AVG(i.total), MAX(i.total)
FROM(
SELECT COALESCE(SUM(a.count) + SUM(b.count), 0) as total
FROM users
LEFT JOIN (
SELECT
COUNT(*) as count,
user_id
FROM "quick_answers"
GROUP BY user_id
You can’t perform that action at this time.