Skip to content

Instantly share code, notes, and snippets.

$(".episodecell").toArray().sort((a,b) => {
var arr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var date = $(".caption2.singleline", a)[1].innerHTML.replace(/^\s+|\s+$/, "").split("•")[0];
var resa = arr.indexOf(date.substr(0,3))*100 + parseInt(date.substr(4));
var date = $(".caption2.singleline", b)[1].innerHTML.replace(/^\s+|\s+$/, "").split("•")[0];
var resb = arr.indexOf(date.substr(0,3))*100 + parseInt(date.substr(4));
return resa - resb;
}).map(X => {
$("h2:contains('All Active Episodes')").after(X);
})
@nurv
nurv / keybase.md
Last active December 4, 2017 15:36

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@nurv
nurv / keybase.md
Last active August 29, 2015 14:06
keybase.md

Keybase proof

I hereby claim:

  • I am nurv on github.
  • I am arturventura (https://keybase.io/arturventura) on keybase.
  • I have a public key whose fingerprint is 16C9 31D3 3D30 0B47 60E2 1241 76D5 3746 3765 55ED

To claim this, I am signing this object:

/*!
* Bootstrap v2.3.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
public static String slugify(String name) {
Pattern NONLATIN = Pattern.compile("[^\\w-]");
Pattern WHITESPACE = Pattern.compile("[\\s]");
name = name.trim();
name = Normalizer.normalize(name, Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
String nowhitespace = WHITESPACE.matcher(name).replaceAll("-");
String normalized = Normalizer.normalize(nowhitespace, Form.NFD);
String slug = NONLATIN.matcher(normalized).replaceAll("");
name = slug.toLowerCase(Locale.ENGLISH);
return name;
diff --git a/src/main/java/net/sourceforge/fenixedu/presentationTier/Action/externalServices/epfl/ExportEPFLPhdProgramCandidacies.java b/src/main/java/net/sourceforge/fenixedu/presentationTier/Action/externalServices/epfl/ExportEPFLPhdProgramCandidacies.java
index 5ec58a4..66a38fe 100644
--- a/src/main/java/net/sourceforge/fenixedu/presentationTier/Action/externalServices/epfl/ExportEPFLPhdProgramCandidacies.java
+++ b/src/main/java/net/sourceforge/fenixedu/presentationTier/Action/externalServices/epfl/ExportEPFLPhdProgramCandidacies.java
@@ -1,183 +1,183 @@
package net.sourceforge.fenixedu.presentationTier.Action.externalServices.epfl;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
#mvn anywhere
_mvn_backsearch(){
if [ ! -f pom.xml ]; then
if [[ `pwd` == "/" ]]; then
echo "Not within a Maven Project"
else
cd ..
_mvn_backsearch
fi
#python manage.py anywhere
_pmanage_backsearch(){
if [ ! -f manage.py ]; then
if [[ `pwd` == "/" ]]; then
echo "Not within a Django Project"
else
cd ..
_pmanage_backsearch
fi
@nurv
nurv / create-repo.sh
Created May 4, 2012 13:49 — forked from yefim/create-repo.sh
Create a new GitHub repo
#!/bin/bash
read -s -p "GitHub password: " pass
# I assume the GitHub API and authentication works because I don't want to parse JSON
curl -u "yefim323:$pass" https://api.github.com/user/repos -d "{\"name\":\"$1\"}" > /dev/null
git remote add origin git@github.com:yefim323/$1.git
@nurv
nurv / hack.sh
Created March 31, 2012 12:21 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#