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
(comment | |
"We were doing a 'nop' battle in IRC today. First it was manual typing of 'nop's, | |
but quickly we got certain scripts running. | |
Learning clojure, I thought I could come over the top easily. And I did. I | |
defined a lazy cycling sequence containing 'nop', then I tried to get the last | |
entry of that list. | |
Unfortunately this didn't just burn my CPU (as I expected), but it also allocated | |
so much memory in seconds, that my X got shutdown by kernel. |
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
#include <stdio.h> | |
int main() { | |
char source[] = "Foobar123"; | |
char * target; | |
target = (char *) malloc(sizeof(source)); | |
memcpy (target, source+1, sizeof(source)); | |
// prints: "oobar123" |
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 | |
# Script for compressing images. Saves me about 17% of space with no visible | |
# difference. Measured on > 250 pictures from my 10MP camera. | |
for image in "$@" | |
do | |
# Make exif tag in jpg - set's the file's creation date. | |
jhead -mkexif $image | |
convert -resize 80% -quality 85 $image $image |
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
class TourHistory < ActiveRecord::Base | |
belongs_to :location | |
end | |
class LocationHistory < ActiveRecord::Base | |
has_many :tours | |
belongs_to :user | |
end | |
class User < ActiveRecord::Base |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<script type="text/javascript" src="showdown.js"></script> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script> | |
jQuery(document).ready(function() { | |
$('#leftContainer textarea').keyup(function() { | |
var input = $('#leftContainer textarea').val(); |
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 | |
# | |
# synopsis | |
# | |
# ruby merge_locales.rb config/locales translations.yml | |
require 'yaml' | |
require 'rubygems' | |
require 'highline/import' |
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
struct { | |
int a; | |
union { | |
int b; | |
float c; | |
}; | |
int d; | |
} foo; |
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
Rails 3.x | |
install bundler | |
install rack | |
Possibly migrate to new gitosis: https://wiki.panter.ch/moin/git | |
Add bundler to project: http://gembundler.com/rails23.html | |
Add dependencies for POL from pol/README |
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
diff --git a/app/views/pages/edit.html.haml b/app/views/pages/edit.html.haml | |
index c0e5a6a..f545605 100644 | |
--- a/app/views/pages/edit.html.haml | |
+++ b/app/views/pages/edit.html.haml | |
@@ -9,7 +9,7 @@ | |
#page_form{ :style => 'display: none;' } | |
!= render :partial => 'pages/form' | |
-#page_content{ } | |
+#page_content |
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
diff --git a/app/views/layouts/pol.html.haml b/app/views/layouts/pol.html.haml | |
index 1340bfb..1b46a5c 100644 | |
--- a/app/views/layouts/pol.html.haml | |
+++ b/app/views/layouts/pol.html.haml | |
@@ -3,11 +3,11 @@ | |
%head | |
- content_for :title, "Panter llc - #{@page.title}" | |
!= render :partial => 'layouts/html_head' | |
- %meta(name='Description' content='Panter bietet umfassende, qualitativ hochstehende Beratungs-,Engineering- und Support-D | |
- %meta(name='Keywords' content='Consulting, Beratung, Software, Softwareentwicklung, Security, Monitoring, Interception, P |
OlderNewer