Skip to content

Instantly share code, notes, and snippets.

View vasilevichra's full-sized avatar
🏸

vasilevichra

🏸
View GitHub Profile
@jamesmacfie
jamesmacfie / README.md
Created October 22, 2019 02:53
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@guilgaly
guilgaly / 1 - scalac options 2.13.scala
Last active June 2, 2024 19:50
Scala compiler options I typically use
val scalacOptions = Seq(
"-encoding",
"utf-8", // Specify character encoding used by source files.
"-Ybackend-parallelism", //
"8",
"-explaintypes", // Explain type errors in more detail.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
// "-Ymacro-annotations", // Enable support for macro annotations, formerly in macro paradise.
@virenratan
virenratan / macos-doh-cloudflare.md
Created September 19, 2018 06:55
macOS DoH (DNS over HTTPS) using cloudflare DNS servers
brew install dnscrypt-proxy

Edit /usr/local/etc/dnscrypt-proxy.toml and edit server_names

server_names = ['cloudflare']

Then just start it and ensure it starts on boot

sudo brew services start dnscrypt-proxy
@soderlind
soderlind / Install.txt
Last active March 5, 2024 20:30
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@brycemcd
brycemcd / openzoom.zsh
Created December 14, 2016 15:34
Opens a zoom meeting in a browser from the command line
#!/bin/zsh
# Opens a zoom meeting with the name you've given it.
# Drop this script in /usr/local/bin/openzoom
# Invoke with `openzoom meeting_name`
typeset -A meeting
# NOTE: set this hashmap with meeting_name and ids of that meeting
meeting[meeting_name]=123456789
@andyscott
andyscott / zoom.sh
Created September 23, 2015 16:35
zoom script for OSX
#!/usr/bin/osascript
# usage: zoom <room-number> [room-password] [--name=NAME]
on split(theString, theDelimiter)
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to theDelimiter
set theArray to every text item of theString
set AppleScript's text item delimiters to oldDelimiters
return theArray
@ralavay
ralavay / vim-nginx-conf-highlight.sh
Last active June 17, 2024 12:27
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF