This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SociagramApi(object): | |
""" | |
Ported over from Sociagrams really shoddy Zend based API client (lololol, many fails, very 'enterprise') | |
""" | |
def __init__(self, key=None, secret=None): | |
self.api_url = 'https://api.sociagram.com/v1' | |
self.key = settings.SOCIAGRAM_API_KEY if key is None else key | |
self.secret = settings.SOCIAGRAM_API_SECRET if secret is None else secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Copyright © 2014 G Roberts. All Rights Reserved *) | |
namespace MiniForum.Model | |
open System | |
open System.Threading.Tasks | |
open MiniForum | |
open MiniForum.Model | |
open Fredis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef SockJS_Options = { | |
@:optional var debug: Bool; | |
@:optional var devel: Bool; | |
@:optional var server: String; | |
@:optional var protocols_whitelist: Array<String>; | |
}; | |
extern class SockJS { | |
// Constants | |
static inline var CONNECTING: Int = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract Callback(Dynamic->Void) from Dynamic->Void { | |
inline function new(f) | |
this = f; | |
public inline function invoke(data:Dynamic):Void | |
(this)(data); | |
@:from static function fromNiladic(f:Void->Void):Callback | |
return new Callback(function (x) f()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__all__ = ('treedel', 'treemap', 'treeadd') | |
from hashlib import sha1 | |
def hashname(*args): | |
hashed = sha1() | |
for arg in args: | |
hashed.update(str(arg)) | |
return hashed.hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
xrandr --output ... | |
i3status & | |
xfce4-session & | |
exec i3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Lazy Load - jQuery plugin for lazy loading images | |
* | |
* Copyright (c) 2007-2009 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* Project home: | |
* http://www.appelsiini.net/projects/lazyload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef EASYHS_HPP_ | |
#define EASYHS_HPP_ | |
#pragma once | |
#include <handlersocket/hstcpcli.hpp> | |
#include <QList> | |
#include <QVariant> | |
#include <QRunnable> | |
#include <QObject> | |
#include <QMetaProperty> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The server density API is so easy with a shake of jsonpath :) | |
Example: | |
groups = sdapi.call('servers/listGroups', '$..groups') | |
web_server_ids = sdapi.call('servers/getByGroup', '$..serverId', group='Web') | |
For a jsonpath reference, try: http://code.google.com/p/jsonpath/wiki/Javascript | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class packages::ruby { | |
package{ | |
['ruby','rubygems','ruby-dev']: | |
ensure => present; | |
} | |
} | |
define rubygem( | |
$version = "" | |
) { |
OlderNewer