Handy one-liners for sed
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement [email protected]
Latest version of this file is usually at:
-
This file is also available in Portuguese at:
#http://www.engadget.com/2011/08/22/why-hibernate-or-safe-sleep-mode-is-no-longer-necessary-in-os/ | |
#https://www.idelta.info/archives/some-hidden-changes-in-os-x-el-capitan/ | |
# disable hibernation | |
sudo pmset hibernatemode 0 | |
# clear the image file | |
sudo rm -rf /var/vm/sleepimage | |
# inhibit file recreation |
#!/usr/bin/env bash | |
# ~/.osx — https://mths.be/osx | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
(* Import and update your Pinboard bookmarks to DEVONthink | |
Based on work done by Christian Grunenberg on Mon Jan 23 2006, | |
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and | |
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished. | |
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items | |
Copyright (c) 2018. All rights reserved. *) | |
use framework "Foundation" |
property targetDir : "/Users/bkelly/Dropbox/Notes/" | |
property editorApp : "/Applications/Byword.app" | |
on getNewFileName() | |
set fileName to (text returned of (display dialog "Enter the filename with extension" default answer "Untitled-1.md")) | |
return fileName | |
end getNewFileName | |
tell application "Byword" | |
set fname to my getNewFileName() |
What was your favorite toy growing up? | |
What accomplishment are you most proud of? | |
Which of your friends are you proudest of? Why? | |
What is the most beautiful place you’ve ever been? | |
What are your 3 favorite movies? | |
Who are the 3 greatest living musicians? | |
What is a great book you’ve read recently? | |
Do you feel like a leader at your compnay? | |
What is the most courageous thing you’ve ever done? | |
Who is the funniest person you know? |
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement [email protected]
Latest version of this file is usually at:
This file is also available in Portuguese at:
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "waiting for the following arguments: username + max-page-number" | |
exit 1 | |
else | |
name=$1 | |
fi | |
if [ -z "$2" ]; then |