- Add volume
- fdisk /dev/volume
- Make primary partition with type 8e(lvm)
- # echo -e “n\np\n1\n\n\nt\n8e\nw\n” | fdisk /dev/volume
- pvcreate /dev/volume1
- vgextend volumegroupname /dev/volume1
- lvextend -l +100%FREE /full/vg/lv/path
- resize2fs /full/vg/lv/path
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
(setq | |
browse-url-chromium-program "/opt/homebrew-cask/Caskroom/google-chrome/latest/Google Chrome.app/Contents/MacOS/Google Chrome" | |
browse-url-firefox-program "/opt/homebrew-cask/Caskroom/firefox/41.0.1/Firefox.app/Contents/MacOS/firefox") | |
(defun my-browse-url-maybe-privately (url &optional new-window) | |
"Ask whether URL should be browsed in a private browsing window." | |
(interactive "sURL: ") | |
(if (y-or-n-p "Private Browsing? ") | |
(my-browse-url-chrome-privately url) | |
(browse-url-default-browser url new-window))) |
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
cmd = 'dict surprise' | |
fi, fo, fe = os.popen3(cmd) | |
for i in fo.readlines(): | |
print i, |
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
1 #!/usr/bin/env python | |
2 | |
3 __module_name__ = "DictBot" | |
4 __module_version__ = "0.1" | |
5 __module_description__ = "DictBot by Muneeb" | |
6 | |
7 import xchat | |
8 import os | |
9 | |
10 |
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
#!/usr/bin/env python | |
__module_name__ = "DictBot" | |
__module_version__ = "0.1" | |
__module_description__ = "DictBot by Muneeb" | |
import xchat | |
import os | |
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
import xmpp | |
GMAIL_ID = '[email protected]' | |
PASS = 'yourpass' # if you have app specific pass, you'll need to generate one for this | |
jid = xmpp.protocol.JID(GMAIL_ID) | |
C = xmpp.Client(jid.getDomain(), debug=['always']) | |
if not C.connect(("talk.google.com",5223)): | |
raise IOError('Can not connect') | |
if not C.auth(jid.getNode(),PASS): | |
raise IOError('Can not auth with server') |
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
These are the scripts I use to create the playlists for the AI Class (available here: http://www.mrspeaker.net/2011/10/26/ai-class-playlists/). It's not pretty, but it works. I put them up here due to popular demand. | |
The first stage is to grab the video list HTML from YouTube and extract/sort the videos. This is done with the Video_ID_scraper.html file (instructions there). | |
Next, paste the video info into the YouTube_Playlist_Uploader.py script and it generates the playlist. It relies on the GData APIs so you need a dev key etc. | |
Any questions to [email protected] |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = "Deepak.G.R." | |
__license__ = 'Public Domain' | |
""" | |
usage: | |
Go to command line and type | |
python ai-class.py "topic-name" |