Skip to content

Instantly share code, notes, and snippets.

View Nanodragon999's full-sized avatar
🏠
Searching for a remote work.

Norton Nanodragon999

🏠
Searching for a remote work.
  • France
View GitHub Profile
#!/usr/bin/env python
# vim:set encoding=utf-8:
# GistID: 5078559
#
# Requirements: python2 (>= 2.7), python-git
#
# Copyright ⓒ 2013 Philipp Kern <pkern@debian.org>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@elssar
elssar / grab_pdfs.py
Created March 14, 2013 11:48
Download all the pdf files linked in a given webpage.
#!/usr/bin/env python
"""
Download all the pdfs linked on a given webpage
Usage -
python grab_pdfs.py url <path/to/directory>
url is required
path is optional. Path needs to be absolute
@mojodna
mojodna / NOTES.md
Last active May 20, 2019 09:23
libvirt LXC container w/ bridged networking (and 2GB RAM)

https://wiki.ubuntu.com/SergeHallyn_libvirtlxc

apt-get install -y libvirt-bin lxc
lxc-create -t ubuntu -n o1
wget http://people.canonical.com/~serge/o1.xml
virsh -c lxc:// define o1.xml
virsh -c lxc:// start o1
virsh -c lxc:// console o1
@quchen
quchen / trolling_haskell
Last active November 12, 2024 00:10
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@hubgit
hubgit / journal-feeds.csv
Created April 24, 2013 15:50
All the journal feeds in JournalTOCs
We can't make this file beautiful and searchable because it's too large.
publisher id,feed id,feed url,journal url,journal title
1050,28092,http://journals.uran.ua/eejet/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.uran.ua/eejet/,"Східно-Європейський журнал передових технологій : Eastern-European Journal of Enterprise Technologies"
1761,25094,http://feeds.feedburner.com/Archeomatica?format=xml,http://www.archeomatica.it/,Archeomatica
1739,24698,http://cerealchemistry.aaccnet.org/action/showFeed?ui=0&mi=3b39wk&ai=rs&jc=cchem&type=etoc&feed=rss,http://cerealchemistry.aaccnet.org/journal/cchem,"Cereal Chemistry"
1721,27750,http://journals.aau.dk/index.php/MIPO/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.aau.dk/index.php/MIPO,"Musikterapi i Psykiatrien Online"
1549,26667,http://ojs.statsbiblioteket.dk/index.php/bras/gateway/plugin/WebFeedGatewayPlugin/rss,http://ojs.statsbiblioteket.dk/index.php/bras,"Brasiliana - Journal for Brazilian Studies"
1549,27775,http://ojs.statsbiblioteket.dk/index.php/claw/gateway/plugin/WebFeedGatewayPlugin/rss,http://ojs.statsbiblio
@goodmami
goodmami / logging.bash
Last active May 6, 2024 18:24
Basic logging commands for Linux shell scripts
#!/bin/bash
##
## Simple logging mechanism for Bash
##
## Author: Michael Wayne Goodman <goodman.m.w@gmail.com>
## Thanks: Jul for the idea to add a datestring. See:
## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854
## Thanks: @gffhcks for noting that inf() and debug() should be swapped,
## and that critical() used $2 instead of $1
@ushu
ushu / S3 buckets copy.md
Created October 29, 2013 16:12
Copy between S3 buckets w/ different accounts

This is a mix between two sources:

basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts

Basically the idea there is:

  • we allowe the destination account to read the source bucket (in the console for the source account)
  • we log as the destination and start the copy
@kendellfab
kendellfab / read_line.go
Created November 11, 2013 17:41
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
@gionn
gionn / lxc_mount_bind.md
Created November 21, 2013 16:49
How to enable bind mount inside lxc container

How to enable bind mount inside lxc container

When mount is returning:

STDERR: mount: block device /srv/database-data/postgres is write-protected, mounting read-only
mount: cannot mount block device /srv/database-data/postgres read-only

and dmesg shows:

@sblask
sblask / national_geographic_wallpaper_archive_download.sh
Created November 26, 2013 01:01
Download national geographic wallpaper archive
#!/bin/bash
root=http://ngm.nationalgeographic.com/wallpaper/img/
year_number=07
months_letters=(jan feb march april may june july aug sept oct nov dec)
for month in {1..12}
do
month_letters=${months_letters[month - 1]}
for index in {1..20}