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/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
on appIsRunning(appName) | |
application appname is running | |
end appIsRunning | |
-- taken from: | |
-- http://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service |
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/sh | |
# Usage: | |
# . ./setenv.sh | |
# | |
# echo $ENV1 | |
# blah1 | |
# | |
# echo $ENV2 | |
# blah2 |
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
i=44 | |
s="We; n7trangMsL8loT63Ke rules5s8d8I | |
AJull commit4nt'sChatFKink: of6CHldn'tRetKisJrom<ny@Ruy-/A= if?<sk 42DS'tLE 4?;Lo8bli=L7ee.. | |
O,R1)O,R001)/-.." | |
" | |
I justCannaLE?2Gotta >u=Msta=.| | |
Ng1Nlet? downNrun<rH=5desMt?N>cryNsayRoodbyeNtE< lie5hurt?| | |
We'T3n each@Jor s8lSg6r hear9<ch: but6;Lo7hyL7BInsideCe both3Cha9Ro: S | |
We3KeRa45we;QplB|1)O)NgiT, nPgiT |
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
module Helpers | |
def with_captured_stdout | |
original_stdout = $stdout | |
$stdout = StringIO.new | |
yield | |
$stdout.string | |
ensure | |
$stdout = original_stdout | |
end | |
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
# frozen_string_literal: true | |
class Color < ApplicationRecord | |
scope :red, -> { where(color: 'red') } | |
scope :yellow, -> { where(color: 'yellow') } | |
scope :blue, -> { where(color: 'blue') } | |
scope :non_primary, -> { where.not(id: red).where.not(id: yellow).where.not(id: blue) } | |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"program": "${workspaceFolder}/test.js", | |
"runtimeExecutable": "${workspaceRoot}/node.sh" | |
} |
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
person-data |
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
8.10.0 |
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
0.11.8 |
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 bash | |
INPUT_FILE=some-input-file.txt | |
OUTPUT_FILE=output.txt | |
while read p; do | |
pipecount=$(echo $p | awk -F"|" '{print NF}') | |
if [ $pipecount == 45 ]; then | |
echo "$p|" >> $OUTPUT_FILE | |
else |
NewerOlder