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
module rss_proxy; | |
import tools.base, std.file, tools.downloader; | |
string download(string url) { | |
char* tmpfilp = tmpnam(null); | |
if (!tmpfilp) throw new Exception("could not get temp file name"); | |
auto tmpfil = toString(tmpfilp); | |
scope(exit) unlink(toStringz(tmpfil)); | |
if (system(toStringz("/usr/bin/wget --timeout=60 -q -O \""~tmpfil~"\" \""~url~"\"")) == -1) { |
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/bash | |
PATH="/mnt/data/www/temp_rss/" | |
DATE=/bin/date | |
STAT=/usr/bin/stat | |
SED=/bin/sed | |
TOUCH=/usr/bin/touch | |
EXECPATH="/mnt/data/www/rss_proxy" | |
TERM="" | |
if [ -z "$QUERY_STRING" ] || [[ $QUERY_STRING == url* ]] | |
then |
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
--- | |
{{ range $_, $cont := $ }} | |
{{ $addrLen := len $cont.Addresses }} | |
{{ $envLen := len $cont.Env }} | |
{{ $regLen := len $cont.Image.Registry }} | |
- id: "{{ $cont.ID }}" | |
{{ if eq $addrLen 0 }} | |
addresses: ~ | |
{{ else }} | |
addresses: |
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
#!/usr/bin/env ruby | |
require 'bigdecimal' | |
class Dc | |
def initialize | |
@stack = [] | |
@registers = [] | |
# TODO: support these |
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
<span id="email">@</span> |
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
# Excess (v.FINAL) | |
# Félix Saparelli 2011-13 | |
# Public Domain (CC0) | |
xs() { echo "Excess is dead. See https://github.com/passcod/bin"; } | |
xs-update() { xs; } |
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
/* Coded by @passcod, MIT Licensed: passcod.mit-license.org | |
Adapted from @shojberg's cssarrowplease.com | |
*/ | |
@mixin arrow-box( $selector: ".arrow-box", | |
$position: "top", | |
$arrow_size: 10px, | |
$border_width: 2px, | |
$box_color: #333, | |
$border_color: #ccc) { | |
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
toSource2 = (data) -> | |
typ = typeof data | |
if typ == "number" and isNaN data | |
"NaN" | |
else if ["string", "number", "boolean"].indexOf(typ) != -1 | |
JSON.stringify data | |
else if typ == "function" | |
"(#{data.toString()})" | |
else if data instanceof Array | |
"[#{data.map(toSource2).join(", ")}]" |
OlderNewer