-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
| #NoEnv | |
| SetBatchLines, -1 | |
| Gui, Font, s16, Arial | |
| Gui, Add, Edit, x10 y10 w450 h30 vPath gUpdate | |
| Gui, Add, Button, x460 y10 w30 h30 gSelectFile, ... | |
| Gui, Font, s12, Courier New | |
| Gui, Add, Edit, x10 y50 w480 h340 vCode ReadOnly -Wrap, <Output> | |
| Gui, Show, w496 h398, AutoHotkey Decompiler |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| Because gdrive will not actually sync symlinks from your computer to gdrive, you should temporarily do the opposite. | |
| For example, I wanted to have a symlink from my ~/Sites directory to automatically sync with gdrive, so i did the simple command: | |
| ln -s ~/Sites/drive ~/Google\ Drive/mSites/ | |
| That will not sync at the moment. | |
| So instead I made a directory in gdrive and did a symlink back in my ~/Sites directory |
| #encoding:UTF-8 | |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'FasterCSV' | |
| require 'httparty' | |
| require 'json' | |
| require 'highline/import' | |
| def get_input(prompt="Enter >",show = true) |
| #!/bin/sh | |
| # This script will migrate schema and data from a SQLite3 database to PostgreSQL. | |
| # Schema translation based on http://stackoverflow.com/a/4581921/1303625. | |
| # Some column types are not handled (e.g blobs). | |
| SQLITE_DB_PATH=$1 | |
| PG_DB_NAME=$2 | |
| PG_USER_NAME=$3 |
| module Where | |
| class <<self | |
| attr_accessor :editor | |
| def is_proc(proc) | |
| source_location(proc) | |
| end | |
| def is_method(klass, method_name) | |
| source_location(klass.method(method_name)) |
| /* The API controller | |
| Exports 3 methods: | |
| * post - Creates a new thread | |
| * list - Returns a list of threads | |
| * show - Displays a thread and its posts | |
| */ | |
| var Thread = require('../models/thread.js'); | |
| var Post = require('../models/post.js'); |
| <?php | |
| /** | |
| * File: SimpleImage.php | |
| * Author: Simon Jarvis | |
| * Modified by: Miguel Fermín | |
| * Based in: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
| * | |
| * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License | |
| * as published by the Free Software Foundation; either version 2 |
| <?php | |
| $apnsHost = 'gateway.sandbox.push.apple.com'; | |
| $apnsCert = 'apns-dev.pem'; | |
| $apnsPort = 2195; | |
| $streamContext = stream_context_create(); | |
| stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); | |
| $apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext); |