Skip to content

Instantly share code, notes, and snippets.

View queirozfcom's full-sized avatar
💪
Nobody cares, work harder

Felipe Almeida (queirozfcom) queirozfcom

💪
Nobody cares, work harder
View GitHub Profile
package tables
import models.Cat
import slick.driver.JdbcProfile
class CatTable(driver: JdbcProfile) {
import driver.api._
class Cats(tag: Tag) extends Table[Cat](tag, "CAT") {
def name = column[String]("NAME", O.PrimaryKey)
@matterche
matterche / serialFutures.scala
Created July 20, 2015 15:20
Non-blocking serial execution of futures
// see http://www.michaelpollmeier.com/execute-scala-futures-in-serial-one-after-the-other-non-blocking/
def serialiseFutures[A, B](l: Iterable[A])(fn: A ⇒ Future[B])
(implicit ec: ExecutionContext): Future[List[B]] =
l.foldLeft(Future(List.empty[B])) {
(previousFuture, next) ⇒
for {
previousResults ← previousFuture
next ← fn(next)
} yield previousResults :+ next
}
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active March 13, 2025 04:59
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@5agado
5agado / Pandas and Seaborn.ipynb
Created February 20, 2017 13:33
Data Manipulation and Visualization with Pandas and Seaborn — A Practical Introduction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.