Skip to content

Instantly share code, notes, and snippets.

@laughedelic
laughedelic / sbt-dependency-management-guide.md
Last active May 14, 2024 16:55
Explicit dependency management in sbt

Some of these practices might be based on wrong assumptions and I'm not aware of it, so I would appreciate any feedback.

  1. avoiding some dependency conflicts:

    • install sbt-explicit-dependencies globally in your ~/.sbt/{0.13,1.0}/plugins/plugins.sbt
    • run undeclaredCompileDependencies and make the obvious missing dependencies explicit by adding them to libraryDependencies of each sub-project
    • (optionally) run unusedCompileDependencies and remove some obvious unused libraries. This has false positives, so ; reload; Test/compile after each change and ultimately run all tests to see that it didn't break anything
    • (optionally) add undeclaredCompileDependenciesTest to the CI pipeline, so that it will fail if you have some undeclared dependencies
  2. keeping dependencies up to date and resolving conflicts:

    • install sbt-updates globally in your `~/.sbt/{0.13,1.0}/plugins/plugins.
@pbsds
pbsds / fix-android-12.sh
Last active May 14, 2024 16:53
fix android 12
# mobile data be expensive
# https://twitter.com/MishaalRahman/status/1452868924152983552
adb shell settings put secure sysui_qs_tiles "wifi,cell,custom(com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff),$(adb shell settings get secure sysui_qs_tiles)"
# no google
adb shell settings put secure assist_touch_gesture_enabled 0
# gotta go fast
adb shell settings put global animator_duration_scale 0.5
adb shell settings put global transition_animation_scale 0.5
@liamfoneill
liamfoneill / bootstrap.ps1
Created October 25, 2021 11:05
This is a file I use to bootstrap a new Windows installation with all of the applications and tools that I use. Ideally I would get everything from Winget but there are times when I need to get the apps from chocolately or Windows Store.
winget install code52.Carnac -s winget
winget install Github.GithubDesktop -s winget
winget install Postman.Postman -s winget
winget install Github.cli -s winget
winget install Microsoft.Powertoys -s winget
winget install Microsoft.AzureCLI -s winget
winget install Microsoft.VisualStudioCode -s winget
winget install Microsoft.VisualStudio.2022.Enterprise -s winget
winget install Microsoft.Bicep -s winget
winget install Microsoft.Teams -s winget
@michaelbutler
michaelbutler / Steam_Proton_Exe.md
Last active May 14, 2024 16:52
How to run another .exe in an existing proton wine prefix

Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?

Simply run this command in a terminal:

cd /path/to/steam/steamapps/compatdata/20920/pfx

STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
    "$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@vviikk
vviikk / Importing-Markdown-into-Medium-a.k.a-write-your-articles in-Markdown.md
Created November 15, 2018 10:20
Importing Markdown into Medium a.k.a write your articles in Markdown

The Medium editor is great and it will get better.Medium has taken the world by storm and I spend a lot of time absorbing all the great information here.

However, there's one drawback. I would like to write my articles offline. And also, even when online, I'd want something more minimal to write my articles - fast. I'm a command-line junkie and take my notes via sncli - a simple note client that is awesome, and allows me to use my favorite text editor - Vim. On the Mac, I use nvAlt

The original way, that used to work, doesn't anymore. I tried it and Medium imported nothing than the heading. Now, Medium's import is looking for a URL, which I assume is parsing as a HTML Document.

Copy / paste method

You will need to either:

  • convert your Markdown to HTML first. Copy & paste it into your article.
  • use many of markdown editors that have a preview mode. Copy that, and paste it in.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 14, 2024 16:49
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@cobyism
cobyism / gh-pages-deploy.md
Last active May 14, 2024 16:48
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@tokland
tokland / google-timeline-download.sh
Last active May 14, 2024 16:47
Get KML of Google Maps Timeline for a date range
#!/bin/bash
set -e -u -o pipefail
# Usage: Export a cookies.txt file from a browser logged-in in timeline.google.com with some
# add-on/extension (i.e. Export cookies, Get cookies.txt). Now run the script for the
# desired period:
#
# $ bash google-timeline-download.sh cookies.txt 2022-01-01 2022-02-20 out.kml
#
# Dependencies: curl, perl-xml-twig.