Skip to content

Instantly share code, notes, and snippets.

View RolandWarburton's full-sized avatar
🍃

Roland RolandWarburton

🍃
View GitHub Profile
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active April 26, 2024 11:12
Block Meta and Twitter (nginx)
@marcosvpj
marcosvpj / vscode-remove-duplicate-lines.md
Last active March 22, 2024 13:41
How to remove duplicate lines in Visual Studio Code?

If the order of lines is not important##

Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)

  1. Control+F

  2. Toggle "Replace mode"

  3. Toggle "Use Regular Expression" (the icon with the .* symbol)

@teocci
teocci / disable-bixby.md
Last active July 8, 2022 04:48
How to disable/uninstall Bixby without root access

How to disable/uninstall Bixby without root access

Ever since Samsung announced the Galaxy S8 with its onboard assistant, Bixby, people have been asking for ways to disable it and forget the button ever existed in the first place. With the Galaxy S9 and Note 9, that chorus became even louder, and with the Galaxy S10 now available, a whole new generation of customers will be looking to disable Bixby.

Why do you want to disable Bixby?

One of the biggest frustrations with the Bixby button is its placement; the button is right under the volume keys and nearly directly opposite the power buttons. On larger phones like the Galaxy S9+ and Note 8, this often leads to accidental presses and unintended Bixby launches, especially when double-pressing the power button to launch the camera.

The Bixby button is also not mappable to another action; Samsung wants you to use it for Bixby, or not at all. This isn't ideal, so many people will inevitably choose to just forget it exists and move on.

While the hardware

@jkohlin
jkohlin / index.html
Created June 28, 2017 10:58
Frequency and amplitude visualiser using web audio API
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Web audio API</title>
<style>
</style>
</head>
<body>
<button id="play-btn" style="display:none;">play/pause</button>
@mosquito
mosquito / README.md
Last active April 27, 2024 00:07
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@Rich-Harris
Rich-Harris / footgun.md
Last active April 19, 2024 07:47
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@ddeveloperr
ddeveloperr / git_push_force_upstream.md
Last active September 6, 2023 15:52
How to force “git push” to overwrite remote repo files WITH LOCAL files

You want to push your local files to remote files

git push -f <remote> <branch>
git push -f origin master

Local version has priority over the remote one!

more...

@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys