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
[ | |
// | |
// VIM NAVIGATION SHORTCUTS | |
// | |
{ | |
// "ctrl+h": Focuses on the left editor group when the text editor is focused, Vim extension is active, and Vim is not in Insert mode. | |
"key": "ctrl+h", | |
"command": "workbench.action.focusLeftGroup", | |
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'" |
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
# WSL2 network port forwarding script v1 | |
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
# written by Daehyuk Ahn, Aug-1-2020 | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; | |
exit; | |
} |
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
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
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
### Keybase proof | |
I hereby claim: | |
* I am izaac on github. | |
* I am izaacz (https://keybase.io/izaacz) on keybase. | |
* I have a public key ASAQdvc3uKh_77jJIaODMbvsLGKri5wBeWyBX5oj8OzBswo | |
To claim this, I am signing this object: |
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
require "selenium-webdriver" | |
saucelabs_username = "zfilipin" | |
saucelabs_key = "" # secret | |
name = "firefox" | |
version = "36.0" | |
platform = "Linux" | |
caps = Selenium::WebDriver::Remote::Capabilities.send(name) |
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
#!/usr/bin/env node | |
/* jshint node: true */ | |
'use strict'; | |
var program = require('commander'); | |
function add(a, b){ | |
return a + b; | |
} | |
function numericSort(a,b) { |
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
from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
class DomHelper(object): | |
driver = None | |
waiter = None | |
def open_page(self, url): | |
self.driver.get(url) |
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
from plone.dexterity.utils import createContentInContainer | |
from plone.namedfile.file import NamedBlobFile | |
import transaction | |
def Builder(name): | |
if name == "dossier": | |
return DossierBuilder(BuilderSession.instance()) | |
elif name == "document": | |
return DocumentBuilder(BuilderSession.instance()) | |
elif name == "task": |
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
#!/bin/bash | |
# Backs up the OpenShift PostgreSQL database for this application | |
# by Skye Book <[email protected]> | |
NOW="$(date +"%Y-%m-%d")" | |
FILENAME="$OPENSHIFT_DATA_DIR/$OPENSHIFT_APP_NAME.$NOW.backup.sql.gz" | |
find $OPENSHIFT_DATA_DIR -name $OPENSHIFT_APP_NAME.*backup* -type f -mtime +30 -exec rm '{}' \; | |
pg_dump $OPENSHIFT_APP_NAME | gzip > $FILENAME | |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
# from selenium.webdriver.support.ui import Select | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary | |
from selenium.common.exceptions import NoSuchElementException | |
from locale import LC_ALL, atof, setlocale |