Skip to content

Instantly share code, notes, and snippets.

View gnanet's full-sized avatar

Gergely Nagy gnanet

  • Self-Employed Freelancer
  • Hungary
  • X @gnanet
View GitHub Profile
@nu7hatch
nu7hatch / example.html
Created September 7, 2010 14:20
Simple banner rotator with jQuery
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<link href="rotate.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="rotate.js"></script>
<script type="text/javascript">
$(window).load(function() {
startRotator("#rotator");
})
</script>
@justinkelly
justinkelly / Google Apps SRV records :: DNS
Created October 5, 2010 03:10
Google Apps SRV records :: DNS
; SRV
_jabber._tcp.@ 1 IN SRV 5 0 5269 xmpp-server.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server4.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server2.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server1.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server3.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 50 0 5222 talk4.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk1.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 20 0 5222 talk3.l.google.com
@jakebellacera
jakebellacera / ICS.php
Last active October 11, 2024 10:58
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@smasty
smasty / 01.php
Created June 6, 2011 22:33
10 PHP One Liners to Impress Your Friends - http://smasty.net/blog/10-php-oneliners
<? foreach(range(1, 10) as $i) echo $i * 2 . " ";
@onyxfish
onyxfish / wordpress.vcl
Created June 28, 2011 21:34
ChicagoNow Varnish configuration (development version)
backend app1 {
.host = "127.0.0.1";
.port = "8000";
}
acl purge {
"127.0.0.1";
"::1";
}
@rsvp
rsvp / httpstatus
Created August 25, 2011 18:00
httpstatus : bash script to get HTTP response code with optional status message (includes verbose definitions in comment)
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
@nexeck
nexeck / bootstrap.php
Created September 26, 2011 16:57
Kohana v3.2 Bootstrap for multiple environment configs
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
@yellowled
yellowled / ffmpeg-html5
Created December 6, 2011 19:39
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. Will probably convert this to a bash script later, but for the time being, here's some examples. Not sure there have actually sensible dimensions and bitrates for web video.
# webm
ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm
# mp4
ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4
# ogg (if you want to support older Firefox)
ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend
@darconeous
darconeous / biosreport.txt
Last active July 28, 2018 15:28
LG N4B2 NAS Hacking Information #Hacking #Reverse-Engineering #Logs
--------------------------------------------------------------------------------
AMIBIOS Information Report
--------------------------------------------------------------------------------
BIOS Name: Pineview
ROM File: LG-N~BD6.ROM
Thu, Feb 02, 2012 09:21:29
BIOS MODULES
------------
@krogsgard
krogsgard / woo-loop-image-wrap.php
Created June 29, 2012 03:51
WooCommerce insert wrapper around thumbnail images in loop
<?php
/* This snippet removes the action that inserts thumbnails to products in teh loop
* and re-adds the function customized with our wrapper in it.
* It applies to all archives with products.
*
* @original plugin: WooCommerce
* @author of snippet: Brian Krogsard
*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);