Skip to content

Instantly share code, notes, and snippets.

View kerim's full-sized avatar

P. Kerim Friedman kerim

View GitHub Profile
@kerim
kerim / markdownsample2
Created February 21, 2018 18:41
A sample markdown page made from the Linguistic Anthropology Wikipedia page using Markdownifier for demonstration in a blog post on anthro{dendum}. (This one shows what it looks like after removing extraneous code with RegEx.)
# Linguistic anthropology - Wikipedia
**Linguistic anthropology** is the interdisciplinary study of how language influences social life. It is a branch of anthropology that originated from the endeavor to document endangered languages, and has grown over the past century to encompass most aspects of language structure and use.
Linguistic anthropology explores how language shapes communication, forms social identity and group membership, organizes large-scale cultural beliefs and ideologies, and develops a common cultural representation of natural and social worlds.
## Historical development
As Alessandro Duranti has noted, three paradigms have emerged over the history of the subdiscipline: the first, now known as "anthropological linguistics," focuses on the documentation of languages; the second, known as "linguistic anthropology," engages in theoretical studies of language use; the third, developed over the past two or three decades, studies questions related to other subfields of anthropology with the
@kerim
kerim / markdownsample
Last active February 21, 2018 18:23
A sample markdown page made from the Linguistic Anthropology Wikipedia page using Markdownifier for demonstration in a blog post on anthro{dendum}.
[Source](https://en.wikipedia.org/wiki/Linguistic_anthropology "Permalink to Linguistic anthropology - Wikipedia")
# Linguistic anthropology - Wikipedia
**Linguistic anthropology** is the [interdisciplinary][1] study of how language influences social life. It is a branch of [anthropology][2] that originated from the endeavor to document [endangered languages][3], and has grown over the past century to encompass most aspects of [language structure][4] and use.[[1]][5]
Linguistic anthropology explores how language shapes communication, forms social identity and group membership, organizes large-scale cultural beliefs and ideologies, and develops a common cultural representation of natural and social worlds.[[2]][6]
## Historical development[[edit][7]]
@kerim
kerim / findandreplace.applescript
Created December 28, 2016 01:57
AppleScript to find and replace text in file using TextWrangler
tell application "TextWrangler"
open theFile
replace "[FIND TEXT]" using "[REPLACE TEXT]" searching in text 1 of front document options {starting at top:false, wrap around:true, backwards:true, case sensitive:true, match words:true, extend selection:false}
replace "[FIND TEXT 2]" using "[REPLACE TEXT 2]" searching in text 1 of front document options {starting at top:false, wrap around:true, backwards:true, case sensitive:true, match words:true, extend selection:false}
tell front document
save
end tell
@kerim
kerim / getname.AppleScript
Last active December 28, 2016 01:54
Run External AppleScript to Get Name of Downloaded OPML outline file from first entry (using TextWrangler and passing to Hazel)
hazelProcessFile(theFile)
on hazelProcessFile(theFile)
tell application "TextWrangler"
open theFile
tell application "TextWrangler"
set theFindResult to find "<outline text=\"(.*)\" >" searching in text document 1 options {search mode:grep, starting at top:true}
@kerim
kerim / Boundary 2 CSL No Initial
Last active August 29, 2015 14:19
Boundary 2 CSL No Initials
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Boundary 2 Chicago Manual of Style 16th edition (author-date) No Initials</title>
<id>http://www.zotero.org/styles/boundary-2-chicago-manual-of-style-16th-edition-author-date</id>
<link href="http://www.zotero.org/styles/boundary-2-chicago-manual-of-style-16th-edition-author-date" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
@kerim
kerim / Boundary 2 CSL
Created April 14, 2015 15:48
Boundary 2 CSL File
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Boundary 2 Chicago Manual of Style 16th edition (author-date)</title>
<id>http://www.zotero.org/styles/boundary-2-chicago-manual-of-style-16th-edition-author-date</id>
<link href="http://www.zotero.org/styles/boundary-2-chicago-manual-of-style-16th-edition-author-date" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
@kerim
kerim / WP to Jekyll Migration Notes
Last active May 12, 2020 00:55
Notes on migrating Wordpress Blog to GitHub Project Pages using Jekyll and the Hyde theme
I recently migrated ( http://keywords.oxus.net/ ) from my own server to GitHub project pages using Jekyll and the Hyde theme ( https://github.com/poole/hyde ). This Gist documents some of the issues I faced and how I solved the problems.
1. I tried to follow the instructions found on these sites:
http://blog.8thcolor.com/en/2014/05/migrate-from-wordpress/
http://blog.codeinside.eu/2014/09/13/How-We-Moved-From-Wordpress-To-Jekyll-On-Windows/
http://www.nooku.org/blog/2013/03/from-wordpress-to-jekyll/
http://chadfield.org/work/how-i-migrated-wordpress-to-jekyll/
http://www.girliemac.com/blog/2013/12/27/wordpress-to-jekyll/
http://virtuallyhyper.com/2014/05/migrate-from-wordpress-to-jekyll/
@kerim
kerim / Chrome to Sente
Last active December 15, 2015 07:18 — forked from anonymous/Chrome to Safari
Open frontmost URL in Chrome in Sente's built-in browser
tell application "Google Chrome"
set the clipboard to (the URL of active tab of first window of application "Google Chrome") as text
end tell
tell application "Sente 6" to activate
tell application "System Events"
keystroke "t" using command down
keystroke "v" using command down
keystroke return
end tell
@kerim
kerim / FT2REMARK
Created March 13, 2013 12:16
FoldingText to Remark AppleScript
to searchReplace(thisText, searchTerm, replacement)
set AppleScript's text item delimiters to searchTerm
set thisText to thisText's text items
set AppleScript's text item delimiters to replacement
set thisText to "" & thisText
set AppleScript's text item delimiters to {""}
return thisText
end searchReplace
on write_to_file(this_data, target_file, append_data) -- (string, file path as string, boolean)