Archives
Trending
Support
Login
Python Interact with Firefox
Show paste
#install
sudo aptitude install firefoxdriver python-selenium
#useage
from selenium import webdriver
Tab Completion in Python
Show paste
#enable auto tab completion in Python
Create a file .pythonrc
# ~/.pythonrc
# enable syntax completion
Get User Input String
Show paste
#include <stdio.h>
int main(){
/* A nice long string */
char string[256];
Adding Columns with AWK
Show paste
#example File1
bob smith 100
tim zim 123
ted fred 450
bob hill 543
Raspberry Pi GPS Radio Power Meter
Show paste
#!/bin/bash
dir=/home/pi/output/
mkdir -p "$dir"
Find all Bootable Partitions
Show paste
#displays partition info with * in second colonum for boot partition
sudo fdisk -l
#Just greping for * does not work
sudo fdisk -l |grep '*' #quotes need around *
Split file by string with AWK
Show paste
awk '/YOUR_TEXT_HERE/{n++}{print >"out" n ".txt" }' final.txt
-------------------example--------------
wget "http://pastebin.com/raw.php?i=nCVVCsE8" -O original.lst
awk '/:/{n++}{print >"out" n ".txt" }' original.lst
List all open files
Show paste
find /proc/*/fd -xtype f -printf "%l\n" 2>/dev/null |grep -v " (deleted)$"| sort -u
Busybox file upload cgi script
Show paste
#!/bin/sh
# POST upload format:
# -----------------------------29995809218093749221856446032^M
# Content-Disposition: form-data; name="file1"; filename="..."^M
Bootstrap Scroll Animation
Show paste
$('html, body').animate({scrollTop: $('#contact').offset().top -100 }, 'slow');
Previous
1
2
...
2605
2606
2607
2608
2609
...
2681
2682
Next