Skip to content

Instantly share code, notes, and snippets.

View Sitebase's full-sized avatar
🤘

Wim Mostmans Sitebase

🤘
View GitHub Profile
<script>
// Send cookie data to hacker
alert('Thanks for your cookies:' + document.cookie);
</script>
include foo
@Sitebase
Sitebase / public_get.sublime-snippet
Last active August 29, 2015 14:02
Handy PHP snippets for creating getters and setters
<snippet>
  <content><![CDATA[
public function get${1:Property}() {
  return \$this->${2:$property};
}
]]></content>
  <tabTrigger>publicget</tabTrigger>
  <scope>source.php</scope>
</snippet>
@Sitebase
Sitebase / run.sh
Created August 27, 2014 13:52
Script to generate all the different cover and icon sizes needed for an iPad app
# How to use:
# 1. Make sure you have a large version of the landscape cover and protrait cover and one large version of the icon
# 2. Put them in the same folder as this script, also add a dist folder, so the folder will look like:
# ipad-landscape.png
# ipad-portrait.png
# icon.png
# thisscript.sh
# dist
# 3. Now run thisscript.sh and the result will be available in the dist folder
log ()
@Sitebase
Sitebase / cf-ddns.sh
Last active August 29, 2015 14:06 — forked from larrybolt/cf-ddns.sh
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Update: changed because the old IP-service wasn't working anymore
# Uses curl to be compatible with machines that don't have wget by default
# modified by Ross Hosman for use with cloudflare.
#
# Place at:
# /usr/local/bin/cf-ddns.sh
# if you're lazy (like me): curl https://gist.githubusercontent.com/larrybolt/6295160/raw/9efbc7850613e06db1b415bdf4fbdd8361209865/cf-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.sh && vim /usr/local/bin/cf-ddns.sh
# run `crontab -e` and add next line:
@Sitebase
Sitebase / cf-ddns.sh
Last active August 29, 2015 14:06 — forked from larrybolt/cf-ddns.sh
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Update: changed because the old IP-service wasn't working anymore
# Uses curl to be compatible with machines that don't have wget by default
# modified by Ross Hosman for use with cloudflare.
#
# Place at:
# /usr/local/bin/cf-ddns.sh
# if you're lazy (like me): curl https://gist.githubusercontent.com/Sitebase/8552675cb5401fb42791/raw/e646241fd4fc14a0736eab6b5422ba97a3c1d242/cf-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.sh && vim /usr/local/bin/cf-ddns.sh
# run `crontab -e` and add next line:
@Sitebase
Sitebase / module.js
Created October 7, 2014 08:39
Example of a custom JavaScript module for the BuboBox widget. This module will add an extra popup menu item with some custom text.
/**
* This is an example BBBX widget module
* It can be used to add additional functionallity to the BuboBox platform in a modularized way
*/
window.bbbx_modules = window.bbbx_modules || []; // Make modules array if not yet exists
window.bbbx_modules.push(function(sandbox, $) {
var NAME = 'custommodule';
/**
@Sitebase
Sitebase / bbbx-form-callback.js
Last active August 29, 2015 14:08
BuboBox Javascript module that will post the user submitted form data to your server.
/**
* BuboBox form callback module
*
* @author Wim Mostmans (wim@bubobox.com)
* @license BSD
*
* Copyright (c) 2014 BuboBox
*/
window.bbbx_modules = window.bbbx_modules || []; // Make modules array if not yet exists
window.bbbx_modules.push(function(sandbox, $) {
@Sitebase
Sitebase / bbbx-login-stack.js
Last active August 29, 2015 14:09
Let users login with their custom account before they can submit an entry.
/**
* BuboBox form callback module
*
* @author Wim Mostmans (wim@bubobox.com)
* @license BSD
*
* Copyright (c) 2014 BuboBox
*/
window.bbbx_modules = window.bbbx_modules || []; // Make modules array if not yet exists
@Sitebase
Sitebase / bbbx-module-bootstrap.js
Created November 13, 2014 08:34
Bootstrap custom BuboBox front-end module
/**
* This is an example BBBX widget module
* It can be used to add additional functionallity to the BuboBox platform in a modularized way
*/
window.bbbx_modules = window.bbbx_modules || []; // Make modules array if not yet exists
window.bbbx_modules.push(function(sandbox, $) {
var NAME = 'custommodule';
var exports = {