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
function run() { | |
var query = "{query}"; | |
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
var path = app.pathTo("home folder", {from:"user domain"}) + "/.ssh/config" | |
var fd = app.openForAccess(path, { writePermission: false }); | |
var text = app.read(fd, {as: "text"}); | |
app.closeAccess(fd); |
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
function run() { | |
var query = "{query}" | |
if (query == '' || isNaN(query)) { | |
query = 30; | |
} | |
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true; |
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
PathName = function(path) { | |
this.path = path; | |
this.elements = path.split('/'); | |
this.length = this.elements.length; | |
} | |
PathName.prototype.serviceName = function() { | |
var string = this.elements[4]; | |
switch (string) { |
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
on alfred_script(q) | |
tell application "System Events" | |
if not (exists (processes where name is "Terminal")) then | |
tell application "Terminal" | |
activate | |
do script q in first window | |
end tell | |
else | |
tell application "Terminal" | |
activate |
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
create_table "users" do |t| | |
t.string "name", null: false | |
end | |
create_table "itames" do |t| | |
t.string "name", null: false | |
t.t.integer "category_id", limit: 4, null: false | |
t.t.integer "user_id", limit: 4, null: false | |
end |
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
alias c='cd `git rev-parse --show-toplevel`' | |
alias apacheawk="gawk -vFPAT='([^ ]+)|(\"[^\"]+\")|(\\\\[[^\\\\]]+\\\\])' " | |
alias be='bundle exec' |
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 ruby | |
begin | |
require 'github/markup' | |
rescue LoadError | |
Gem.install 'github-markup' | |
retry | |
end | |
begin |
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
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ | |
# | |
# /etc/screenrc | |
# | |
# This is the system wide screenrc. | |
# | |
# You can use this file to change the default behavior of screen system wide | |
# or copy it to ~/.screenrc and use it as a starting point for your own | |
# settings. | |
# |
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
export ZPLUG_HOME=/usr/local/opt/zplug | |
source $ZPLUG_HOME/init.zsh | |
function ruby_prompt_ifno { | |
if which rbenv > /dev/null; then | |
echo "$(rbenv version-name)" | |
else | |
echo "system" | |
fi |
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
box: ubuntu | |
build: | |
steps: | |
- install-packages: | |
packages: bats | |
- script: | |
name: test | |
code: bats test | |
after-steps: | |
- 1syo/[email protected]: |
NewerOlder