Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.18;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@nitriques
nitriques / import.php
Created June 20, 2014 19:31
Importing data into Symphony-CMS from the command line
<?php
// You run it with php-cli
// i.e. php-cli import.php
// I usually run in on the server via ssh.
// I also usually put my scripts into manifest (to protect them from http access)
// This scripts imports data from a csv...
@netsi1964
netsi1964 / bootstrap.xslt
Last active October 4, 2018 22:16
Dynamicweb Bootstrap Navigation template
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Bootstrap NavBar: http://getbootstrap.com/components/#navbar
/* SHO 24/05/2014 14.34: Standard Twitter Bootstrap NavBar */
Version: 0.9: Første implementering
Example of template tag:
<div class="dwnavigation" settings="template:bootstrap.xslt;fixed:true;"></div>-->
<xsl:output encoding="utf-8" indent="yes" method="xml" omit-xml-declaration="yes"/>
<xsl:param name="html-content-type"/>
@brendo
brendo / package.sh
Created March 28, 2014 23:51
Symphony Build Script
#!/bin/bash
DOZIP=false
DODELETE=false
DODOCS=false
while getopts "v:zrd" opt; do
case $opt in
v)
VERSION=$OPTARG
@wjn
wjn / XSLTHashGenerator.xslt
Created February 27, 2014 16:40
Generates an alpha numeric hash of a specified length using xslt 1. 0 and exlt math library.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:math="http://exslt.org/math"
extension-element-prefixes="math">
<xsl:template name="makeHash">
<xsl:param name="length">8</xsl:param>
<xsl:param name="count" select="$length"/>
<xsl:param name="hash"/>
<xsl:variable name="possibleFirst">xABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</xsl:variable>
@pajcho
pajcho / weather.php
Last active May 25, 2018 11:59
Get weather information based on IP
<?php
function get_client_ip()
{
$ipaddress = '';
if (getenv('HTTP_CLIENT_IP'))
$ipaddress = getenv('HTTP_CLIENT_IP');
else if (getenv('HTTP_X_FORWARDED_FOR'))
$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
else if (getenv('HTTP_X_FORWARDED'))
@cjbell
cjbell / gist:7794216
Created December 4, 2013 19:43
Sir Trevor Multiple Upload Block
SirTrevor.Blocks.Upload = (function(){
return SirTrevor.Block.extend({
droppable: true,
uploadable: true,
type: "Upload",
uploadUrl: function() {
@nitriques
nitriques / sync-starter-kit.sh
Last active March 16, 2018 22:54
sync-starter-kit.sh
#!/bin/bash
#function syncsk27 {
# pwd=`pwd`;
# cd /q;
# ./sync-starter-kit.2.7.sh $@;
# cd $pwd;
#}
VERSION=2.3.0
@szilagyi
szilagyi / base64_css_arrows
Created September 19, 2013 14:17
base64 arrows
/* arrows */
.arrow-right {background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAJUlEQVR42mNgAILy8vL/DLgASBKnApgkVgXIkhgKiNKJ005s4gDLbCZBiSxfygAAAABJRU5ErkJggg==") no-repeat scroll 0 0 transparent}
.arrow-bottom {background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVR42mNgwAfKy8v/48I4FeA0AacVDFQBAP9wJkE/KhUMAAAAAElFTkSuQmCC") no-repeat scroll 0 0 transparent}