Skip to content

Instantly share code, notes, and snippets.

Avatar

Wim Mostmans Sitebase

View GitHub Profile
View sh
curl -s http://www.telize.com/geoip/46.19.37.108 | python -c 'import sys, json; print json.load(sys.stdin)["country"]'
Netherlands
@Sitebase
Sitebase / READM.md
Created Nov 10, 2015
Beckhoff linked test variable
View READM.md
php beckhoff-term-generator.php 2 10 Q
@Sitebase
Sitebase / module.js
Created Sep 29, 2015
Add comments based on meta data under each gallery entry in modern gallery template
View module.js
/**
* Add specific meta field under each entry in the gallery
*
* styling can be done using:
* .reason {
* ...
* }
*
* Replace `meta.waarom` with something else to use another meta key
*/
@Sitebase
Sitebase / index.html
Last active Aug 29, 2015
Facebook share test
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Meta description example" />
<meta name="author" content="Coca" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@Sitebase
Sitebase / data.json
Last active Sep 4, 2019
Lambda auto transcode
View data.json
{
"Records": [
{
"eventVersion": "2.0",
"eventSource": "aws:s3",
"awsRegion": "us-east-1",
"eventTime": "1970-01-01T00:00:00.000Z",
"eventName": "ObjectCreated:Put",
"userIdentity": {
"principalId": "EXAMPLE"
View README.md

If address is already in use:

lsof -n -P -iUDP:1900

kill processes with:

kill -9 [pid]

Now start leapcast:

View template.html
<link href='http://fonts.googleapis.com/css?family=Lora' rel='stylesheet' type='text/css'>
<style>
body{
/* defaults, use for testing the template without PhantomJS */
width: 400px;
height: 400px;
background-color: #2e3192;
font-size: 400px;
@Sitebase
Sitebase / template.html
Created Mar 19, 2015
Twitter tegel template
View template.html
<link href='http://fonts.googleapis.com/css?family=Coming+Soon' rel='stylesheet' type='text/css'>
<style>
* {
box-sizing: border-box;
}
body{
/* defaults, use for testing the template without PhantomJS */
width: 400px;
height: 400px;
font-size: 400px;
@Sitebase
Sitebase / gist:8da8495981672a23daa3
Created Feb 19, 2015
I think we all can agree that the focus outlines are ugly and in most cases destroy the visual aspect of elements. With this snippet you can set the outline to none and still give the user some feedback about where on the page the focus is. For an example of this take a look at the first button in this screenshot https://www.dropbox.com/s/bl3x74…
View gist:8da8495981672a23daa3
*:focus:before {
content: "⇥";
position: absolute;
font-size: 0.8em;
left: 5px;
top: -30%;
}