#How can I recursively copy files by file extension, preserving directory structure? find . -name '*.pdf' | cpio -pdm pdf/
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 datetime | |
class Person(object): | |
def __init__(self, name): | |
#Create a person with name | |
self.name = name | |
try: | |
firstBlank = name.rindex(' ') | |
# print "__init__: firstBlank: ", firstBlank | |
self.lastName = name[firstBlank+1:] |
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
* delete a line in sublime | |
ctrl + shift + k |
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
javascript:(function(){ | |
function replaceAll(find, replace, str) { | |
return str.replace(new RegExp(find, 'g'), replace); | |
} | |
constantURL = "https://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID&autoplay=1"; | |
myURL = window.location.href; | |
constantURL = replaceAll("VIDEO_ID",myURL.split("v=")[1],constantURL); | |
window.location = constantURL | |
})(); |
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. Disable guest login in ubuntu:- | |
1. edit `sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf` | |
2. `allow-guest=false` |
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
"settings":{ | |
"python_interpreter_path": "/usr/bin/python", | |
"python_package_paths": [ | |
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python" | |
] | |
} |
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
javascript:(function(){ | |
var myHref=window.location.href; | |
var myTitle = document.title; | |
window.location = "http://localhost:8080/myTutorials/linksSavedtoLocalFile/" +"#"+myHref+"#"+myTitle; | |
})(); |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |