Skip to content

Instantly share code, notes, and snippets.

View steren's full-sized avatar
🏃‍♀️

Steren steren

🏃‍♀️
View GitHub Profile
@steren
steren / index.html
Created July 2, 2017 15:42
A-frame portfolio
<!DOCTYPE html>
<html>
<head>
<title>Steren Giannini, portfolio</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
@steren
steren / Application.java
Created November 10, 2016 09:54
Stackdriver Error Reporting on Play Framework 1.4
public class Application extends Controller {
@Catch(value={Exception.class})
public static void onException(Exception ex) {
StringWriter exceptionWriter = new StringWriter();
ex.printStackTrace(new PrintWriter(exceptionWriter));
Map<String, Object> payload = new HashMap<String, Object>();
payload.put("message", exceptionWriter.toString());
Map<String,String> serviceContextData = new HashMap<String, String>();
@steren
steren / README.md
Last active July 17, 2016 15:24
Generate tags from a list of names

Creates an SVG image from an array of names.

Example result:

tags

How to use:

  • Add your background images into a ‘background folder’
  • Copy the code in an .html file next to this folder, and start a web server here.
@steren
steren / Color palette showcase.markdown
Created January 24, 2016 23:18
Color palette showcase
@steren
steren / pingstats.sh
Last active January 10, 2016 16:06
ping every 30 sec and store result in a file, used to diagnose internet connection
#!/bin/bash
FILE=$(echo pingstats-$(date '+%Y-%m-%d-%H-%M').csv)
echo "datetime,min,avg,max,stddev" > ${FILE}
while true
do
NOW=$(date -u +"%Y-%m-%d %H:%M:%S")
# retrieve data from ping: min,avg,max,stddev
VALUES=$(ping -c 4 steren.fr | tail -1 | awk '{print $4}' | sed 's/\//,/g')
echo "${NOW},${VALUES}" >> ${FILE}
@steren
steren / app.yaml
Last active August 29, 2015 14:24
Serve only static files with Google AppEngine (like on GitHub pages)
# Add this file at the root of your directory,
# and your static files in a public/ folder.
# Use 'gcloud preview app deploy .' to publish to AppEngine.
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /(.+)
@steren
steren / camping-mafia-extractor.js
Last active August 29, 2015 13:59
Extract data from lecampingmafia.com
var rows = [];
$('table.startups tr').each(function(i, n){
var $row = $(n);
var connect = {};
$row.find('td.connect a').each(function(j, m){
var href = $(m).attr('href');
var key = 'contact';
@steren
steren / poker.js
Last active January 9, 2016 17:06
Poker Tournament manager script to be used with Google Spreadsheet
// Poker Tournament script
// by Steren Giannini http://www.steren.fr
// # How to use
// Use "=computePlayerScoreAndRank()" to generate a tournament ladder, as first argument select a column of player name, as second argument, select the cells of game
/////////////
// Variables
/////////////
@steren
steren / SSE DEMO.md
Last active December 16, 2015 14:49

Simple example of Server Send Events By Steren Giannini for Paris JS

@steren
steren / flickrdownload.html
Created January 26, 2013 00:13
Download all pictures from a flickr set. This script will list links to pictures files. You can then bulk-download them using a browser extension (Download master for Chrome, DownThemAll for Firefox...)
<!DOCTYPE html>
<html>
<head>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>