Skip to content

Instantly share code, notes, and snippets.

View ststeiger's full-sized avatar
😎
Back from holidays

Stefan Steiger ststeiger

😎
Back from holidays
  • Switzerland
View GitHub Profile
@ststeiger
ststeiger / nginx.conf
Last active August 29, 2015 14:06 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ststeiger
ststeiger / elasticsearch.sh
Last active August 29, 2015 14:08 — forked from Globegitter/es.sh
ElasticSearch howto
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
(function ($, document, undefined) {
$.extend({
/**
* A static jQuery-method.
* @param {number} x The x-coordinate of the Point.
* @param {number} y The y-coordinate of the Point.
* @param {Element} until (optional) The element at which traversing should stop. Default is document.body
* @return {jQuery} A set of all elements visible at the given point.
*/
elementsFromPoint: function(x,y, until) {
@ststeiger
ststeiger / README.md
Last active February 23, 2021 15:28 — forked from jstcki/README.md
Swiss Cantons and Municipalities

Map of Switzerland with TopoJSON and map data from Swiss Maps. Cantons and municipalities are combined in a single TopoJSON file.

@ststeiger
ststeiger / ghostxps.sh
Created October 22, 2015 14:49 — forked from manuelmorales/ghostxps.sh
Installing GhostPDL (with GhostXPS) on Ubuntu Oneiric
sudo apt-get install libxext-dev libxt-dev
wget http://downloads.ghostscript.com/public/ghostpdl-9.05.tar.bz2
tar xjf ./ghostpdl-9.05.tar.gz
cd ghostpdl-9.05/
./configure
echo '#define HAVE_SYS_TIME_H' >> xps/obj/gconfig_.h
make xps
./xps/obj/gxps -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -r150 -o /tmp/a.pdf ~/POWERPOINT.xps
@ststeiger
ststeiger / Makefile.golang
Created October 23, 2015 17:53 — forked from dnishimura/Makefile.golang
Makefile for Golang projects
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@ststeiger
ststeiger / visor-archivos-online.md
Created November 11, 2015 13:18 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@ststeiger
ststeiger / SolarInfo.cs
Created March 20, 2016 18:16 — forked from cstrahan/SolarInfo.cs
A sunrise/sunset calculator.
using System;
using System.Diagnostics;
namespace SunriseCalculator
{
public class SolarInfo
{
public double SolarDeclination { get; private set; }
public TimeSpan EquationOfTime { get; private set; }
public DateTime Sunrise { get; private set; }
@ststeiger
ststeiger / fcgiclient.go
Created March 29, 2016 12:00 — forked from wofeiwo/fcgiclient.go
Golang FastCGI Client
// Copyright 2012 Junqing Tan <ivan@mysqlab.net> and The Go Authors
// Use of this source code is governed by a BSD-style
// Part of source code is from Go fcgi package
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15
// By: wofeiwo
package fcgiclient
import (
#!/bin/sh
### BEGIN INIT INFO
# Provides: <SCRIPT_NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO