use this https://github.com/Superbil/apStringToLocalizable version, this is old version
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
(defadvice ido-find-file | |
(after find-file-sudo activate) | |
"Find file as root if necessary." | |
(unless (and buffer-file-name | |
(file-writable-p buffer-file-name)) | |
(find-alternate-file (concat "/sudo:root@localhost:" | |
buffer-file-name)))) |
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
dispatch_group_t group = dispatch_group_create(); | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(10); | |
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
for (int i = 0; i < 100; i++) | |
{ | |
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); | |
dispatch_group_async(group, queue, ^{ | |
NSLog(@"%i",i); | |
sleep(2); | |
dispatch_semaphore_signal(semaphore); |
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
#!/user/bin/env python | |
import zipfile | |
import os.path | |
import time | |
from shutil import copyfile | |
def zipdir(path, zip): | |
relroot = os.path.abspath(os.path.join(path, "..")) |
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 -*- | |
# Define here the models for your scraped items | |
# | |
# See documentation in: | |
# http://doc.scrapy.org/en/latest/topics/items.html | |
# Example | |
# {"expanded":false, | |
# "classes":"folder", | |
# "hasChildren":true, | |
# "id":"100000000A", |
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 zsh | |
pyflakes "$1" | |
# pep8 --repeat "$1" | |
true |
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
- (id)initWithOperationQueue:(NSOperationQueue *)operationQueue | |
{ | |
id object = nil; | |
//////////////////////////////////////////////////////////////////////////////////////////////////// | |
do | |
{ | |
if(operationQueue==nil) | |
{ |
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
# -*- encoding: utf-8 -*- | |
import wx | |
import os.path | |
from wx.lib.dialogs import openFileDialog | |
from SimpleCV import Image, Color, Display | |
# Make a function that does a half and half image. | |
def halfsies(left, right): | |
result = left |