Skip to content

Instantly share code, notes, and snippets.

View CarlQLange's full-sized avatar
💭
Walking 4000 Kilometres around Ireland.

Carl Lange CarlQLange

💭
Walking 4000 Kilometres around Ireland.
View GitHub Profile
WikiDataQuery = Function[query,
ImportString[
URLRead[
HTTPRequest[<|
"Scheme" -> "https",
"Domain" -> "query.wikidata.org",
"Path" -> "bigdata/namespace/wdq/sparql",
"Query" -> URLQueryEncode[<|"query" -> query|>]
|>, <|
"Headers" -> <|"Accept" -> "text/csv"|>
From 86ec8290e2c668230b2fe6471bb3fd0beb3db420 Mon Sep 17 00:00:00 2001
From: Carl Lange <carl@flax.ie>
Date: Fri, 8 Sep 2017 00:42:31 +0100
Subject: [PATCH] set border thickness to a lot for testing
---
src/nsterm.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/nsterm.m b/src/nsterm.m
diff --git a/src/nsterm.m b/src/nsterm.m
index b03ad52621..edc77adfc0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6744,6 +6744,9 @@ - (BOOL)isOpaque
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
#endif
+ win.titlebarAppearsTransparent = true;
+ //win.appearance = [NSAppearance appearanceNamed:NSAppearanceNameVibrantDark];
{
"!name": "meteor",
"Match": {
"Any": "?",
"String": "?",
"Number": "?",
"Boolean": "?",
"undefined": "?",
"null": "?",
"Integer": "?",
@CarlQLange
CarlQLange / newproblem.sh
Created March 14, 2012 03:27
A shell script to set up a new project euler problem, directory structure and problem text included
#!/usr/bin/env sh
number=$1
if [[ $number ]]; then
mkdir ./$number
cd ./$number
python3 -c "\
from bs4 import BeautifulSoup
from urllib.request import urlopen
@CarlQLange
CarlQLange / .tmux.conf
Created December 30, 2011 09:44
My .tmux.conf
#because C-b is surprisingly hard to hit
set -g prefix C-a
#on server start, make a new window and split it in half
new
splitw
#then select the first pane
select-pane -t 0
@CarlQLange
CarlQLange / .profile
Created December 30, 2011 09:43
my .profile (kind of disgusting though)
test -r /sw/bin/init.sh && . /sw/bin/init.sh
export PATH=/opt/local/bin:/opt/local/sbin:~/bin:$PATH
# alias vim to a better vim (one with GUI support, for example)
alias vim="/Applications/MacVim.app/Contents/MacOS/Vim"
# sets the title of the terminal (unecessary iirc but whatev)
title(){
printf "\033k$1\033\\"
Line 2 below breaks, because of the single-quote in the song title. Bash is sucky and doesn't allow
backslash escaping for that, and doing the '"'"' solution (as documented here
http://stackoverflow.com/questions/1250079/bash-escaping-single-quotes-inside-of-single-quoted-strings)
doesn't work because it's already in an applescript string. Best would be a general solution.
osascript -e 'tell application "iTunes"
play track "Rory's First Kiss (Ryeland Allison remix)"
end tell"'
@CarlQLange
CarlQLange / gist:1398137
Created November 27, 2011 20:58
Open all mp3s in all subfolders of ./muzak
import os;
for subdir, dirs, files in os.walk('./muzak'):
for file in files:
if (file[-4:] == '.mp3'):
os.system('open ".' + subdir[1:] + '/' + file + '"')