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
// This is an initial finished prototype demonstrating Sculptie based armor that is affected by damage. (multiple stages of degradation, bullit holes etc) | |
integer damageStage = -1; | |
SendStatus(integer dmg) | |
{ | |
string texture = llGetInventoryName(INVENTORY_TEXTURE,dmg); | |
list params = [PRIM_TYPE, PRIM_TYPE_SCULPT, texture, PRIM_SCULPT_TYPE_SPHERE]; | |
llSetLinkPrimitiveParams(LINK_ALL_OTHERS,params); | |
} |
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
// limit caching to test + live environment and "Published stage" only | |
if (Director::isDev() || Versioned::current_stage() !== 'Live') SS_Cache::set_cache_lifetime('any', -1, 100); |
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
<?php | |
class HowtoPage extends DocumentPage { | |
public static $has_many = array( | |
'Steps' => 'Step', | |
); | |
public function getCMSFields() { | |
$fields = parent::getCMSFields(); | |
Debug::show($this->Steps()); // shows steps when exist |
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
<!-- Sets up an icecast mount point on your own machine --> | |
<icecast> | |
<limits> | |
<sources>2</sources> | |
</limits> | |
<authentication> | |
<source-password>hackme</source-password> | |
<relay-password>hackme</relay-password> | |
<admin-user>admin</admin-user> | |
<admin-password>hackme</admin-password> |
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
set("log.file",false) | |
set("log.stdout",true) | |
source_url = "http://localhost:8000/traktor.ogg" | |
output_host = "example.com" | |
output_port = 8124 | |
output_pass = "mypassword" | |
s = input.http(buffer=4.0,source_url) |
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
// Requires jQuery of course. | |
$(document).ready(function() { | |
$('.show-comments').on('click', function(){ | |
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username. | |
// ajax request to load the disqus javascript | |
$.ajax({ | |
type: "GET", | |
url: "http://" + disqus_shortname + ".disqus.com/embed.js", | |
dataType: "script", |
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
import errno | |
import feedparser | |
import os | |
import sys | |
t = ''' | |
title: {title} | |
--- | |
pub_date: {pub_date} | |
--- |
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
<?php | |
$user = "domain\user"; | |
$pass = "password"; | |
$dn = "OU=..."; | |
$time = microtime(); | |
$time = explode(" ", $time); | |
$time = $time[1] + $time[0]; | |
$start = $time; |
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
set("log.file",false) | |
set("log.stdout",true) | |
source_url = "http://localhost:8000/traktor.ogg" | |
output_host = "example.com" | |
output_port = 8124 | |
output_pass = "mypassword" | |
s = input.http(buffer=4.0,source_url) |
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
<?php | |
try { | |
// Decode JSON data from Github | |
$payload = json_decode($_REQUEST['payload']); | |
} | |
catch(Exception $e) { | |
exit(0); | |
} | |
// Deploy live if push was on master branch |