Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Wondering what you are supposed to put as your GitHub status

Jake Vossen jakevossen5

💭
Wondering what you are supposed to put as your GitHub status
View GitHub Profile
@groz
groz / sync-http.swift
Created Feb 15, 2018
Synchronous http request in Swift
View sync-http.swift
import Foundation
func query(address: String) -> String {
let url = URL(string: address)
let semaphore = DispatchSemaphore(value: 0)
var result: String = ""
let task = URLSession.shared.dataTask(with: url!) {(data, response, error) in
result = String(data: data!, encoding: String.Encoding.utf8)!
@tadly
tadly / pacaur_install.sh
Last active Oct 7, 2021
A simple shell script to quickly / easily install "pacaur" on archlinux
View pacaur_install.sh
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
@linuslundahl
linuslundahl / Ignore .DS_Store forever
Created Sep 13, 2010
Make git always ignore .DS_Store
View Ignore .DS_Store forever
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore