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
| -- AppleScript to create a new file in Finder | |
| -- | |
| -- Use it in Automator, with the following configuration: | |
| -- - Service receives: no input | |
| -- - In: Finder.app | |
| -- | |
| -- References: | |
| -- - http://apple.stackexchange.com/a/129702 | |
| -- - http://stackoverflow.com/a/6125252/2530295 | |
| -- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript |
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
| <?php | |
| /** | |
| * Class to test Db2 SQL Engine | |
| * Tests use static setUpBeforeClass and tearDownAfterClass because setUp and tearDown | |
| * have problems recreating the test library | |
| */ | |
| class DB2iSeriesSQLEngineTest extends PHPUnit_Framework_TestCase | |
| { | |
| protected static $dbUsername = "USERNAME"; |
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
| const Rx = require('rxjs') | |
| const axios = require('axios') | |
| Rx.Observable.interval(1000) | |
| .switchMap(() => { | |
| return axios.get('https://sample.domain') | |
| }) | |
| .subscribe((response) => { | |
| console.log(response) | |
| }) |
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
| const xs = require('xstream').default | |
| const axios = require('axios') | |
| xs.periodic(1000).map(() => { | |
| return xs.fromPromise(axios.get('https://sample.domain')) | |
| }).flatten() | |
| .subscribe({ | |
| next: (response) => { | |
| console.log(response) | |
| } |
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
| --- file path: {user_home}/Library/Services | |
| --- MacOS AppleScript Service to copy current file path to clipboard | |
| --- Service receives: no input | |
| --- in: Finder.application | |
| tell application "Finder" | |
| set pathFile to selection as text | |
| set pathFile to get POSIX path of pathFile | |
| set the clipboard to pathFile | |
| end tell |
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
| --- file path: {user_home}/Library/Services | |
| --- MacOS AppleScript Service to move file to folder | |
| --- Service receives: no input | |
| --- in: Finder.application | |
| tell application "Finder" | |
| set mvfiles to selection | |
| set destFolderPath to choose folder | |
| set destFolder to name of destFolderPath | |
| set destFolder to destFolderPath as string |
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
| --- file path: {user_home}/Library/Services | |
| --- MacOS AppleScript Service to create new file | |
| --- Service receives: no input | |
| --- in: Finder.application | |
| set file_name to "untitled" | |
| set file_ext to "" | |
| set is_desktop to false | |
| -- get folder path and if we're in desktop (no folder opened) |
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
| --- file path: {user_home}/Library/Services | |
| --- MacOS AppleScript Service to open iTerm in current folder | |
| --- Service receives: no input | |
| --- in: Finder.application | |
| on run | |
| tell application "Finder" | |
| activate | |
| try | |
| set this_folder to (the target of the front window) as alias |