A script designed to unidirectionally symlink files between two directories (and move new files back).
Before:
Source Directory:
~/Dropbox/Work/Meetings/2018/sales.xlsx
~/Dropbox/Work/Assets/2018/Apr/campaign_banner.psd
#include "testy.h" | |
using namespace std; | |
using testy::Expect; | |
int main() { | |
// -------------------------------------------- | |
// Basic Usage | |
// How to run a standalone test. | |
// -------------------------------------------- |
-- New File.applescript | Copyright (C) 2018 eth-p | |
-- An applescript for creating a new file in a Finder window. | |
-- Recommended hotkey: CMD+ALT+N | |
-- | |
-- This create an "Untitled [number]" file in the frontmost Finder window. | |
-- The file will automatically be selected and available for renaming. | |
on run {input, parameters} | |
tell application "Finder" | |
if exists Finder window 1 then |
#!/usr/bin/env bash | |
# ----------------------------------------------------------------------------- | |
# https://gist.github.com/eth-p/e96f5214a59f5d2694853da6739580b0 | |
# Copyright (C) 2018 eth-p | |
# | |
# SUMMARY: | |
# This is a hackjob script to get mwoffliner (openzim/mwoffliner) working on | |
# Mac OS X without going through the pain of compiling zimwriterfs and all of | |
# its dependencies. | |
# |
# Copyright (c) 2018 eth-p | |
# ---------------------------------------------------------------------------------------------------------------------- | |
# Argument: | |
# A command line argument. | |
# This is used to describe and validate arguments. | |
class Argument | |
# ----- Types ----- |
# ----------------------------------------------------------------------------- | |
# A function for configuring your user identity. | |
# Copyright (C) 2018 eth-p | |
# ----------------------------------------------------------------------------- | |
function ident | |
set -l GIT_ARGS | |
set -l arg_global | |
set -l arg_ident | |
function Initialize() | |
cached = nil | |
end | |
function Check() | |
local state = SKIN:GetMeasure('measureActive'):GetStringValue() | |
if state == 'null' then | |
state = false | |
else | |
state = true |
#!/usr/bin/env bash | |
# ----------------------------------------------------------------------------- | |
transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi | |
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } | |
# ----------------------------------------------------------------------------- | |
# Verification: | |
if [ $# -ne 0 ]; then | |
indev=/dev/stdin | |
[ -t 0 ] || indev=/dev/tty |
#!/usr/bin/env bash | |
# ---------------------------------------------------------------------------------------------------------------------- | |
# Compile: | |
# ---------------------------------------------------------------------------------------------------------------------- | |
ghc hgrep || exit 1 | |
# ---------------------------------------------------------------------------------------------------------------------- | |
# Arguments: | |
# ---------------------------------------------------------------------------------------------------------------------- |