Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@confluencepoint
confluencepoint / OpenNewFinder.scpt
Created January 22, 2018 19:11 — forked from high-moctane/OpenNewFinder.scpt
新規Finderウインドウ
tell application "Finder"
make new Finder window to (POSIX file "/path/to/folder/")
activate
end tell
@confluencepoint
confluencepoint / cask_upgrade.sh
Created December 17, 2017 19:08 — forked from danijeljw/cask_upgrade.sh
Upgrade casks installed via Homebrew Cask
#!/usr/bin/env bash
brew update
brew cask update
casks=( $(brew cask list) )
for cask in ${casks[@]}
do
# in the first line there is version
@confluencepoint
confluencepoint / icndispdiag.applescript
Created December 17, 2017 19:07 — forked from danijeljw/icndispdiag.applescript
AppleScript display dialog box with icon
Display dialog box with custom icon called _icon.icns_
```
display dialog "My custom icon " buttons {"Cancel", "Continue"} default button "Continue" with icon file "Contents:Resources:icon.icns"
```
```
set x to ((path to me as text) & "Contents:Resources:myicon.icn­s") as alias
display dialog "your text here" with icon x
```
@confluencepoint
confluencepoint / chrome_locators.py
Created December 13, 2017 22:34 — forked from haradreborn/chrome_locators.py
Chromedriver examples with locators
import os
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import time
chromedriver = "D:\\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = chromedriver
@confluencepoint
confluencepoint / moneymoney_export.applescript
Created November 26, 2017 14:18 — forked from jhelgert/moneymoney_export.applescript
Exportiert alle Umsätze des MoneyMoney-Kontos "Jonhel" vom heutigen Tag 00:00Uhr bis zum Zeitpunkt, an dem das Skript ausgeführt wird. Wird im Heimverzeichnis gespeichert.
#!/usr/bin/osascript
set acc to "Jonhel"
set stunden to hours of (current date)
set minuten to minutes of (current date)
set sekunden to seconds of (current date)
set heute_einjahrago to ((current date)- 700*days) as string
set heute_mitternacht to ((current date) - 3600 * stunden - 60 * minuten - sekunden) as string
set jetzt to (current date) as string
(*
Speed up Mail.app by vacuuming the Envelope Index
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/
Originally by "pmbuko" with modifications by Romulo
Updated by Brett Terpstra 2012
Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compability
Updated by @lbutlr for V5 and Container folder in High Sierra and use du
*)
tell application "Mail" to quit
@confluencepoint
confluencepoint / remap_capslock.lua
Created June 25, 2017 08:33 — forked from zcmarine/remap_capslock.lua
Hammerspoon capslock remapping: tap to Escape, hold in chord for Control
-- Inspired by https://github.com/jasoncodes/dotfiles/blob/master/hammerspoon/control_escape.lua
-- You'll also have to install Karabiner Elements and map caps_lock to left_control there
len = function(t)
local length = 0
for k, v in pairs(t) do
length = length + 1
end
return length
end
@confluencepoint
confluencepoint / gist:526260e789feb677fa3224165d7917f7
Created June 20, 2017 05:20 — forked from tednaleid/gist:0982b620a022346a34d24a961c5bb517
karabiner 0.91.3 caps lock to ctrl when chorded or esc when pressed alone
// modified from http://brettterpstra.com/2017/06/14/full-hyper-key-functionality-restored-in-sierra/
// this makes caps lock turn into "left control" if pressed with another key
// and "escape" if pressed by itself. Requires karabiner elements 0.91.3 or higher to have
// the "to_if_alone" section. Place after "simple_modifications" in the ~/.config/karabiner/karabiner.json file
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.",
Generated: Wed, 28 Jan 2015 05:59:39 GMT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.16 Safari/537.36
Extensions: 53
- Context v0.412: https://chrome.google.com/webstore/detail/aalnjolghjkkogicompabhhbbkljnlka
Sort extensions into groups and easily switch between them.
- 1Password: Password Manager and Secure Wallet v4.2.5.90: https://chrome.google.com/webstore/detail/aomjjhallfgjeglblehebfpbcfeobpgk
1Password extension for Google Chrome.
- Anything to QRcode v1.0.5: https://chrome.google.com/webstore/detail/calkaljlpglgogjfcidhlmmlgjnpmnmf
Anything to QRcode ( absolute locally and offline, no ads ) : the url of current page, any text/image/link in the page, etc.
@confluencepoint
confluencepoint / twitter-proxy.php
Created January 12, 2017 07:02 — forked from MikeRogers0/twitter-proxy.php
This is a neat little script you can use to quickly make OAuth requests to the twitter rest API v1.1.
<?php
/**
* Usage:
* Send the url you want to access url encoded in the url paramater, for example (This is with JS):
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2')
*/
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps
$config = array(