Skip to content

Instantly share code, notes, and snippets.

Karteek E karteek

Block or report user

Report or block karteek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dockerfile
FROM busybox
ADD gecho /
ENTRYPOINT ["/gecho"]
@karteek
karteek / doodle.rb
Created Apr 19, 2011
Just a Gist for replacing an image using Squid
View doodle.rb
#!/usr/local/bin/ruby
def is_logo(url)
url =~ /logo1w.png$/
end
while true
input_url = ARGF.readline.strip().split(' ').first
new_url = input_url
if is_logo(input_url)
new_url = "http://path.to.localserver/images/ashok.png"
@karteek
karteek / doodle.py
Created Apr 19, 2011
Gist for replacing an image using Squid
View doodle.py
#!/usr/bin/env python
import sys
def is_logo(url):
# This logo1w.png can change each day
if url.endswith('logo1w.png'):
return True
else:
return False
@karteek
karteek / Enabled-Imports.patch
Created Jan 10, 2010
Enable Imports on my fork of Etherpad
View Enabled-Imports.patch
From c0ab5598975c4e9d092ea5793d99c8b7e229e384 Mon Sep 17 00:00:00 2001
From: Karteek E <nospam@karteek.net>
Date: Mon, 11 Jan 2010 03:26:55 +0530
Subject: [PATCH] Enabled Imports
---
infrastructure/net.appjet.oui/execution.scala | 6 +++---
infrastructure/net.appjet.oui/main.scala | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
@karteek
karteek / etherpad_apache_reverse_proxy
Created Jan 10, 2010
vhost entry for Etherpad installation behind a reverse proxy
View etherpad_apache_reverse_proxy
<VirtualHost *:80>
ServerName example.com
ServerAlias *.example.com
ServerAdmin admin@example.com
ErrorLog /var/log/apache2/etherpad.error.log
LogLevel warn
CustomLog /var/log/apache2/etherpad.access.log combined
ServerSignature Off
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
@karteek
karteek / importexport.scala
Created Dec 28, 2009
Etherpad Oo.org converter
View importexport.scala
/**
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@karteek
karteek / custom_404_for_tumblr.js.htm
Created Dec 19, 2009
A way to enable custom 404 for Tumblr. Well, it 'kinda' works
View custom_404_for_tumblr.js.htm
<script type="text/javascript">
/* Works for me */
var text_posts = document.getElementsByClassName("regular");
var text_404 = "The URL you requested could not be found.";
var title_404 = "Not Found";
if(text_posts.length == 1){
var bodyNode = text_posts[0].lastChild;
if(bodyNode.previousSibling.textContent == text_404) {
// titleNode.innerHTML = "<a href='/'>Not Found</a>";
var blog_loc = "http://" + document.domain + "/";
You can’t perform that action at this time.