Skip to content

Instantly share code, notes, and snippets.

View suda's full-sized avatar
🍃

Wojtek Siudzinski suda

🍃
View GitHub Profile
@mstepniowski
mstepniowski / results.txt
Last active December 10, 2015 22:31
Script showing top 25 talk proposals for DjangoCon Europe 2013
# 25 best talk proposals as of Saturday, 19th of January at 11:59 PM UTC
# ----------------------------------------------------------------------
# Calculated by votes.py from 15383 votes of 790 people.
1. (411) Asynchronous code in Django.
2. (398) How to combine JavaScript & Django in a smart way
3. (375) Website security in Django
4. (364) Advanced PostgreSQL in Django
5. (359) Designing a good API: Lessons Learned
6. (344) Let’s bankrupt Heroku: make your Django run fast
#!/usr/bin/env knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@davisford
davisford / setup-avahi.sh
Created July 12, 2013 14:14
Setup avahi-daemon on Ubuntu for so you can reach hostname `ubuntu.local` from host OS
sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@jgoodall
jgoodall / README.md
Last active September 19, 2023 18:06
This is a sample of how to send some information to logstash via the TCP input from node.js or python.

This is a sample of how to send some information to logstash via the TCP input in nodejs or python. It assumes the logstash host is on 10.10.10.100 and the TCP listening input is 9563.

The logstash.conf should look something like the sample file.

The log message should be a stringified JSON object with the log message in the @message field.

To use, run the node script node sendMessageToLogstash.js, or the python script python sendMessageToLogstash.js

@emachnic
emachnic / fstab
Created August 26, 2013 13:01
Automatically mount Apple Extreme hard drive in Raspberry PI running XBian using fstab.
#/etc/fstab
//10.0.1.1/My\040Passport\040for\040Mac /media/Passport cifs rw,username=xbian,pass=********,sec=ntlm 0 0
@dre1080
dre1080 / all2coffee.sh
Created November 9, 2013 01:25
Js2Coffee a directory recursively. Excludes node_modules, app/assets and public directories.
for FILE in `find . -name "*.js" -type f -o -path './node_modules' -prune -o -path './app/assets' -prune -o -path './public' -prune`
do
if [ -e $FILE ] ; then
COFFEE=${FILE//.js/.coffee}
echo "converting ${FILE} to ${COFFEE}"
js2coffee "$FILE" > "$COFFEE"
else
echo "File: {$1} does not exist!"
fi
@joegoggins
joegoggins / install and add gcc arm to PATH.sh
Last active December 12, 2022 06:59
How I installed GCC ARM on my Mac 10.9 Mac Book Pro
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
@ardcore
ardcore / atom-events
Last active October 13, 2021 20:35
atom.io events
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
@matthiasplappert
matthiasplappert / gist:9493050
Last active August 29, 2015 13:57
QuickLook Debugging for `UIView`
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}