This file contains hidden or 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
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
This file contains hidden or 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
------------------------------------------------------------------------------------------- | |
REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2015/07/08 23:26 | |
------------------------------------------------------------------------------------------- | |
NOTES | |
------------------------------------------------------------------------------------------- | |
AppleScript is a rather peculiar scripting language to learn. |
This file contains hidden or 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
# Keep in mind that when asking for a `return` after another, only the first one will be output. | |
# This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
# Google Chrome | |
tell application "Google Chrome" to return URL of active tab of front window | |
tell application "Google Chrome" to return title of active tab of front window | |
# Google Chrome Canary | |
tell application "Google Chrome Canary" to return URL of active tab of front window | |
tell application "Google Chrome Canary" to return title of active tab of front window | |
# Chromium |
This file contains hidden or 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/python | |
""" | |
brute force get title of web page | |
usage: getTitle.py url | |
Gordon Meyer January 1, 2013 | |
www.gordonmeyer.com | |
""" | |
# modules used | |
import urllib2, urlparse, string, os |
This file contains hidden or 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 -*- | |
# | |
# markdown toc generator, v1.8 | |
# | |
# Jaemok Jeong, 2014/10/27 | |
from AppKit import NSPasteboard, NSArray | |
import re | |
import argparse |
- osx - How to tell full path of file on Mac? - Super User
- 여기 방법 써봤지만 그냥 복사하고 text만 입력할 수 있는 곳에 붙여넣기 하면 자동으로 file path만 남네..
- 굳이 file path를 얻기 위해서 고생할 필요없다..!!
- 지금까지 괜히 파일 정보 열어서 일일이 path를 복사했는데 다 부질없는 짓이었다..
- 단, 파일 정보를 복사했으니까 text만 입력할 수 있는 곳에 입력해야 파일이 완전히 복사되는 것을 막을 수 있다.
- Remove Styles로 붙여넣기 하면 되나 그냥 text만 입력할 수 있는 곳에 하는게 더 빠름... 아니면 라이브러리 열어서 선택하든가.. 자주 안 쓰니까. ok!!
This file contains hidden or 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 os | |
import magic | |
with magic.Magic() as m: | |
path = '/Users/re4lfl0w/Documents/_tmp/2/' | |
for ele in os.listdir(path): | |
ele = os.path.join(path, ele) | |
print('{} - {}'.format(os.path.basename(ele), m.id_filename(ele))) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import requests | |
url = 'http://www.lezhin.com/' | |
resp = requests.get(url) | |
print(resp.text) |