Skip to content

Instantly share code, notes, and snippets.

View Jegp's full-sized avatar

Jens Egholm Pedersen Jegp

View GitHub Profile
@Jegp
Jegp / Question.md
Last active April 4, 2019 06:57 — forked from NikolajX4000/Question.md
Prepared question for assignment 8
@Jegp
Jegp / requirements.txt
Created February 15, 2019 08:48
Requirements file for pip running MyBinder Python projects
backcall==0.1.0
bleach==3.0.2
cycler==0.10.0
decorator==4.3.0
defusedxml==0.5.0
entrypoints==0.2.3
et-xmlfile==1.0.1
ipykernel==5.1.0
ipython==7.2.0
ipython-genutils==0.2.0
@Jegp
Jegp / keybase.md
Created October 19, 2017 21:47
keybase.md

Keybase proof

I hereby claim:

  • I am jegp on github.
  • I am jegp (https://keybase.io/jegp) on keybase.
  • I have a public key ASAhereJ1Mh17oSaRov877vBoR_2K679VFKKr5GSlo9WIQo

To claim this, I am signing this object:

@Jegp
Jegp / Phonemes CMU
Last active February 20, 2017 13:57
pau ay ae m y ao r f aa dh er pau
pau-ay ice
ay-ae miamil
ae-m -
m-y -
y-ao yoghurt
ao-r sorry
r-f barfat
f-aa -
@Jegp
Jegp / presentation.html
Created November 10, 2016 17:21
Single page .html template for reveal.js presentations
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/css/reveal.min.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/css/theme/white.min.css" type="text/css"/>
</head>
<body>
<div class="reveal">
@Jegp
Jegp / jenkins_install.sh
Created September 11, 2016 19:41
A jenkins installation script
#!/bin/bash
##
## This script installs jenkins on debian based machines
## Author: Jegp <jensegholm@protonmail.com>
##
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@Jegp
Jegp / MyController.scala
Last active December 18, 2015 05:19
Using JS routes in Playframework 2.x (Scala)
package controllers
object MyController extends Controller {
def add() = Action { implicit request =>
Form( tuple ( "user" -> number ) ).bindFromRequest.fold(
errors => BadRequest,
t => {
Ok("Add id: " + t)
}
@Jegp
Jegp / Remote.scala
Created October 24, 2012 11:18
How to create a listening server in scala
import scala.actors.Actor._
import scala.actors.remote._
import scala.actors.remote.RemoteActor._
object Remote {
val listening = actor {
alive(6001)
register('AwesomeRemoteServer, self)
println("I'm alive!")
@Jegp
Jegp / gist:3247871
Created August 3, 2012 13:49
How to draw in Siigna
// Create an image
val image = new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR)
// Retrieve graphics
val graphics = image.getGraphics.asInstanceOf[Graphics2D]
// Convert to siigna graphics (much nicer API)
val siignaGraphics = new com.siigna.app.view.Graphics(graphics.asInstanceOf[Graphics2D])
@Jegp
Jegp / Applet.html
Created July 29, 2012 11:40
Java Applet deployment in HTML
<html>
<body>
<!-- See this link for explanation: http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html -->
<object classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA">
<param name="code" value="AppletTest.class">
<comment>
<embed code="AppletTest.class"
type="application/x-java-applet;jpi-version=1.7.0">
<noembed>
No Java Support.