Skip to content

Instantly share code, notes, and snippets.

@eych
eych / aws-kinesis-agent
Created January 18, 2016 12:10 — forked from chen206/aws-kinesis-agent
init script for aws-kinesis-agent 1.0.2 on ubuntu 14.04
#! /bin/sh
#
. /lib/lsb/init-functions
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/start-aws-kinesis-agent
NAME=aws-kinesis-agent
DESC=aws-kinesis-agent
@eych
eych / gist:1416081
Created December 1, 2011 11:39
Raw email
Delivered-To: eycher@gmail.com
Received: by 10.231.20.69 with SMTP id e5cs87389ibb;
Thu, 1 Dec 2011 03:29:56 -0800 (PST)
Received: by 10.204.145.89 with SMTP id c25mr6910955bkv.35.1322738994435;
Thu, 01 Dec 2011 03:29:54 -0800 (PST)
Return-Path: <noreply@15gifts.com>
Received: from akado.ru (fe02x03-cgp.akado.ru. [77.232.31.165])
by mx.google.com with ESMTP id m6si7521430bke.54.2011.12.01.03.29.53;
Thu, 01 Dec 2011 03:29:54 -0800 (PST)
package Stuffed::Evo::Partners;
use strict;
use Stuffed::System;
use Stuffed::System::Database qw(&table);
sub update_partner {
return table('evo_partners')->update( @_ );
}
@eych
eych / jquery.hashchange.js
Created December 18, 2009 10:37
Added proper onhashchange detection
/**
* jQuery hashchange 1.0.1
*
* History:
* 1.0.1 - added proper onhashchange detection & removed unused and excessive code
*
* Warning!
* You need to ALWAYS make changes to document.location.hash through $.locationHash(newHash) function
*
* (based on jquery.history)
<!-- Was -->
<a href="/"><img src="/images/logo.small.png" width="199" height="50"></a>
<!-- Became -->
<a href="/" style="display: block; width: 199px; height: 50px; background: url(/images/logo.small.png)"></a>
<%part name="tel_row" standalone="1"%>
<div style="padding: 2px">
<input type="text" name="tel" value="<%$tel.number%>" maxlength="20" style="width: 150px">&nbsp;<img
src="<%$pkg.idefit.public_url%>/common/images/silk/add.gif" style="vertical-align: middle; cursor: pointer" onclick="addTelRow(this)">&nbsp;<img
src="<%$pkg.idefit.public_url%>/common/images/silk/delete.gif" style="vertical-align: middle; cursor: pointer<%if $tel.__loop_length == 1%>; display: none<%/if%>" onclick="removeTelRow(this)">
</div>
<%/part%>
<%loop $tels as $tel%>
<%include part="tel_row"%>
# Generated: Sat Aug 8 17:48:45 2009
#
# This is a compiled version of a Stuffed Template. Don't make modifications
# to this file, modify the original template instead.
no warnings; $compiled->{version} = '1.26'; $compiled->{strip_html_comments} = '1'; $compiled->{code} = sub {
my $s=shift @_; my $v=$s->{vars}; my @p=(); my $in = $system->in;
if((false($v->{'users'}))){push @p,'Не найдено ни одного пользователя';}push @p,'
';if((true($v->{'users'}))){push @p,'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="list">
<%import error_handler from system suppress_browser_handler="0" show_custom_message="0"%>
<%$error_handler.custom_message_start%>На этой странице только что произошла ошибка!\n\nВозможно, страница по-прежнему пригодна к использованию.\n\nПриносим извинения за доставленные неудобства и хотим заверить, что уже работаем над устранением проблемы.<%$error_handler.custom_message_end%>
<%$error_handler.js%>
<%import unique from system%>
<script type="text/javascript">
$("#<%$unique.id%>").livequery(function() {
$(this).stuffed_initForm({
dataType: 'json',
success: function(json, jqForm) {
var jqExtraRow = jqForm.parents('[__stuffed]:first');
jqRow = jqExtraRow.data('jqOriginalRow');
// a hack? or not?
<%if not $users%>Не найдено ни одного пользователя<%/if%>
<%if $users%>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="list">
<tr class="first">
<td>Пользователь</td>
</tr>
<%loop $users as $one%>
<tr id="ul_<%$one.id%>" __edit_row="/cp/users.html?do=show_edit&id=<%$one.id%>">
<td><%$one.username%></td>