Skip to content

Instantly share code, notes, and snippets.

View alexsorokoletov's full-sized avatar

Alex Sorokoletov alexsorokoletov

View GitHub Profile
@alexsorokoletov
alexsorokoletov / remove-bin-obj.sh
Last active October 1, 2019 12:13
Clear bin/obj folders for Xamarin projects, as well as other temporary Xamarin files. Developer lifesaver
#!/bin/bash
# based on http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt
find . -iname "bin" -type d | xargs rm -rf
find . -iname "obj" -type d | xargs rm -rf
# clear VS4Mac temporary downloads
echo ~/Library/Caches/VisualStudio/7.0/TempDownload/
for f in ~/Library/Caches/VisualStudio/7.0/TempDownload/* ; do
sudo rm -rf $f
done
@mattes
mattes / default.conf
Last active June 4, 2022 06:43
redash.io setup
upstream redash {
server redash:5000;
}
server {
listen 80;
location / {
return 301 https://$host$request_uri;
}
@alexsorokoletov
alexsorokoletov / Web.config
Created January 23, 2017 15:23
Web.config for Azure App Services/Web Sites to allow downloading static files (withouth extension) for Electron autoupdate
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension="." mimeType="text/plain" />
<mimeMap fileExtension=".nupkg" mimeType="application/octet-stream" />
<mimeMap fileExtension=".exe" mimeType="application/octet-stream" />
<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" />
</staticContent>
</system.webServer>
@alexsorokoletov
alexsorokoletov / wifi_level.30s.sh
Last active May 24, 2021 19:55
xbar bitbar plugin for wifi speed and name - I use it to find weak wifi spots or confirm that the wifi signal jumps
#!/usr/bin/env bash
# <bitbar.title>WiFi level</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Alex Sorokoletov</bitbar.author>
# <bitbar.author.github>alexsorokoletov</bitbar.author.github>
# <bitbar.desc>TX rate/Link speed of the connected WiFi</bitbar.desc>
# <bitbar.dependencies></bitbar.dependencies>
# <bitbar.abouturl>https://sorokoletov.com/</bitbar.abouturl>
@RandyMcMillan
RandyMcMillan / macos_disable_airplay.sh
Last active September 8, 2023 20:31
MacOS: toggle "AirPlay Receiver" in "System Preferences" pane id "com.apple.preferences.sharing"
#!/bin/bash
osascript <<EOS
on toggle()
tell application "System Preferences" to reveal pane id "com.apple.preferences.sharing"
tell application "System Events" to tell window 1 of application process "System Preferences"
repeat until exists checkbox 1 of (first row of table 1 of scroll area 1 of group 1 whose value of static text 1 is "AirPlay Receiver")