Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Haskelling

Christian Panadero PaNaVTEC

:shipit:
Haskelling
View GitHub Profile
View KineticScroll.ts
// Original imp: https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin
// Adapted to phaser 3 By Christian Panadero
export default class KineticScroll {
private pointerId
private startX
private startY
private screenX
private screenY
View gist:d8854f5cbc056a470b7f390c74b1eb51
### Keybase proof
I hereby claim:
* I am panavtec on github.
* I am panavtec (https://keybase.io/panavtec) on keybase.
* I have a public key whose fingerprint is 293C 58BE C820 CD5E 3166 D681 88EF 58F8 8BE6 19F6
To claim this, I am signing this object:
View UserInteractionApplication.scala
package me.panavtec
import cats.free.Free
import cats.{Id, ~>}
import scala.io.StdIn
object UserInteractionApplication {
sealed trait UserInteraction[A]
@PaNaVTEC
PaNaVTEC / GuessTheSecretNumber.scala
Created Mar 11, 2017
Simple Free monad example
View GuessTheSecretNumber.scala
package me.panavtec
import cats.free.Free
import cats.{Id, ~>}
import scala.io.StdIn
object GuessTheSecretNumber {
sealed trait UserInteraction[A]
View asdf
import org.scalatest._
class CellTest extends FlatSpec with Matchers {
"a cell" should "die when has less than 2 neighbours" in {
val cell = Cell(1, true)
val isAliveNextGeneration = cell.nextGeneration()
isAliveNextGeneration shouldBe false
@PaNaVTEC
PaNaVTEC / Converter.py
Last active Dec 7, 2015
Converts "Los 40 principales" playlist to "Artist - Title" to use with playlist-converter.net for example and import to Deezer/Spotify
View Converter.py
import requests
import re
import unicodedata
REGEX_LOS40 = "datos_cancion_\d+\['(titulo_cancion|nombre_artista)'\]\s*=\s*'([^\']*)'"
def removeAccents(data):
return unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore').decode()
def sanitize(artist):
@PaNaVTEC
PaNaVTEC / Coordinator.java
Last active Nov 4, 2016
Coordinates various actions and fires a callback when all are complete
View Coordinator.java
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
public class Coordinator {
private List<String> actions;
private Set<String> completedActions = new TreeSet<>();
private CoordinatorCompleteAction coordinatorCompleteAction;
@PaNaVTEC
PaNaVTEC / Proguard config
Last active May 17, 2018
Proguard config
View Proguard config
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/panavtec/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@PaNaVTEC
PaNaVTEC / Popular songs of Last.fm to iTunes library
Last active Aug 29, 2015
Popular songs of Last.fm to iTunes library
View Popular songs of Last.fm to iTunes library
@PaNaVTEC
PaNaVTEC / PulldownListViewHelper
Last active Aug 29, 2015
PullDown Android detector
View PulldownListViewHelper
import android.widget.AbsListView;
import android.widget.ListView;
/**
* Makes a listview to have a pull down, this is a wrapper.
* Is not a good idea to override a ListView because there
* are a lot of libraries and we dont know when we need one.
*/
public class PulldownListViewHelper {
You can’t perform that action at this time.