Skip to content

Instantly share code, notes, and snippets.

//Copy from apache.commons.StringUtils.isAlphaNumberSpace
def isAlphanumericDash(str: String): Boolean = {
if (isBlank(str)) {
return false
}
str.foreach {
c =>
if ((Character.isLetterOrDigit(c) == false) && (c != '-')) {
return false
}
@Daenyth
Daenyth / crash
Created June 22, 2014 23:28
osx crash
```
Process: cockatrice [5200]
Path: /Applications/cockatrice.app/Contents/MacOS/cockatrice
Identifier: ???
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [244]
Responsible: cockatrice [5200]
User ID: 501
@Daenyth
Daenyth / shortlog.txt
Created June 26, 2014 00:44
git shortlog --since=2014-05-17
Daenyth (31):
Add the ability to friend/ignore an offline user
Revert "Merge pull request #89 from dylan/master"
Add settings fields for pic urls
Use picUrl templates to download cards.
Fix #105 - remove emdash from card type when getting main type
Don't be a jerk when card database isn't usable.
Don't have decklist sort behavior rely on column order
Log on failed path copy
Update CentOS doc in user manual
pkgname=cockatrice-git
pkgver=0
pkgrel=1
pkgdesc="A multiplatform application for playing card games such as Magic: The Gathering over a network."
arch=('i686' 'x86_64')
url="http://github.com/Daenyth/Cockatrice"
license=('GPL2')
depends=('qt5-svg' 'qt5-multimedia' 'qt5-tools' 'protobuf')
makedepends=('git' 'cmake')
_gitroot="git://github.com/Daenyth/Cockatrice.git"
@Daenyth
Daenyth / gist:f3d3593e654a99d00ed5
Created August 16, 2014 11:46
Minecraft forge crash
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 8/16/14 7:44 AM
Description: Initializing game
java.lang.NoClassDefFoundError: tconstruct/tools/items/Manual
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at cpw.mods.fml.common.registry.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:70)
# Configuration file
"tinker's construct addon: iguana tweaks for tinkers construct" {
# Stuff used for debugging. You probably don't want this.
B:Debug=false
# Modify tool and item mining levels to create a tiered-ish progression
B:HarvestLevelTweaks=true
# All the Items Iguana Tweaks for TConstruct adds (Clay Buckets,...)
[08:46:22] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLServerTweaker
[08:46:22] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLServerTweaker
[08:46:22] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLServerTweaker
[08:46:22] [main/INFO] [FML]: Forge Mod Loader version 7.10.25.1207 for Minecraft 1.7.10 loading
[08:46:22] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_65, running on Mac OS X:x86_64:10.9.4, installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
[08:46:22] [main/WARN] [FML]: The coremod appeng.transformer.AppEngCore does not have a MCVersion annotation, it may cause issues with this version of Minecraft
[08:46:22] [main/INFO] [FML]: [AppEng] Core Init
[08:46:23] [main/WARN] [FML]: The coremod codechicken.core.launch.CodeChickenCorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft
[0
@Daenyth
Daenyth / fail #1
Last active August 29, 2015 14:05
[06:59:06] [Server thread/ERROR] [FML]: Caught exception from IguanaTweaksTConstruct
java.lang.NoSuchMethodError: mantle.pulsar.control.PulseManager.isPulseLoaded(Ljava/lang/String;)Z
at iguanaman.iguanatweakstconstruct.IguanaTweaksTConstruct.preInit(IguanaTweaksTConstruct.java:97) ~[IguanaTweaksTConstruct.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[FMLModContainer.class:?]
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
@Daenyth
Daenyth / gist:da2b196bae08ea98fb7f
Created December 23, 2014 21:47
HungerOverhaul compile failure
gbisesi:HungerOverhaul gbisesi$ ./gradlew build --stacktrace
archive path >> /Users/gbisesi/HungerOverhaul/build/libs/HungerOverhaul-1.7.10-beta.3.DEV.8e2010e.jar
/Users/gbisesi/HungerOverhaul/build/libs/HungerOverhaul-1.7.10-beta.3.DEV.8e2010e.jar
****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
#!/usr/bin/env python
import lxml.html
import lxml.objectify
RULES_URL = "http://www.kaijudochannel.com/search?multiCiv=yes&format=Open&sortBy=c.level&sortOrder=asc&sortMode=list"
def download_spoiler(url):
"""=> html object"""
return lxml.html.parse(url)