Skip to content

Instantly share code, notes, and snippets.

View neowinx's full-sized avatar

Pedro Flores neowinx

View GitHub Profile
diff -r --unified play-2.0-orig/framework/build play-2.0-cygwin/framework/build
--- play-2.0-orig/framework/build 2012-03-12 20:25:28.000000000 -0700
+++ play-2.0-cygwin/framework/build 2012-06-15 17:56:57.436000000 -0700
@@ -8,4 +8,4 @@
DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi
-java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@"
\ No newline at end of file
+java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=$BOOTPROP`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@"
Migrates multiple SVN repos to GitHub, without anything fancy (no Ruby, no dependencies, no issues with Cygwin paths). SVN tags are created as Git tags and properly pushed to GitHub. To run:
1) Edit run-authors.sh to have your SVN repos. Run it to get an authors.txt file.
2) Edit the authors.txt to have GitHub names and emails if you like. You must use GitHub user email addresses if you want contributions to be associated with GitHub accounts.
3) Create the GitHub projects, without populating it with a readme or license.
4) Edit run-convert.sh to have your SVN repos, GitHub user URL, and GitHub project name. Run it.

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

On master:

> git co -b temp

On temp:

Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black
import scala.slick.lifted.CanBeQueryCondition
// optionally filter on a column with a supplied predicate
case class MaybeFilter[X, Y](val query: scala.slick.lifted.Query[X, Y]) {
def filter[T,R:CanBeQueryCondition](data: Option[T])(f: T => X => R) = {
data.map(v => MaybeFilter(query.filter(f(v)))).getOrElse(this)
}
}
// example use case
import java.sql.Date
// optionally filter on a column with a supplied predicate
case class MaybeFilter[X, Y](val query: scala.slick.lifted.Query[X, Y]) {
def filter[T](data: Option[T])(f: T => X => scala.slick.lifted.Column[Boolean]) = {
data.map(v => MaybeFilter(query.filter(f(v)))).getOrElse(this)
}
}
// example use case
def find(id: Option[Int], createdMin: Option[Date], createdMax: Option[Date], modifiedMin: Option[Date], modifiedMax: Option[Date]) = {
@neowinx
neowinx / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@neowinx
neowinx / git-remote-tags-by-date.sh
Last active November 2, 2015 21:13
Jenkins Extensible Choice System Groovy Choice Parameter to obtain sortered tags from GIT
/*
* Groovy script to sort git tags by date. It uses this script for that porpuse https://gist.github.com/neowinx/a42015892802a19a4a96#file-git-remote-tags-by-date-sh
* If the Job doesn't have a workspace generated, the tags will be unsortered (in theory, this will only happen the first time the project is build)
*/
workspace = project.someWorkspace
uri = project.scm.repositories[0].URIs[0].toString()
def tags = []
def t1 = []
@neowinx
neowinx / Install-Docker-on-Linux-Mint.sh
Created November 5, 2015 12:30 — forked from sirkkalap/Install-Docker-on-Linux-Mint.sh
Install Docker on Linux Mint
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
@neowinx
neowinx / steam.sh
Created January 24, 2016 05:29
arch linux steam start
LD_PRELOAD="/usr/lib32/libasound.so.2:/usr/lib/libasound.so.2" primusrun steam