Skip to content

Instantly share code, notes, and snippets.

View rickstaa's full-sized avatar
🏠
Working from home

Rick Staa rickstaa

🏠
Working from home
View GitHub Profile
@mrtcmn
mrtcmn / workaround.css
Created November 27, 2020 15:04
firefox backdrop-filter workaround
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
.blurred-container {
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
}
/* slightly transparent fallback for Firefox (not supporting backdrop-filter) */
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
.blurred-container {
@epwalsh
epwalsh / ci.yml
Last active January 5, 2021 15:06
Python GitHub Actions with venv cache
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
@epwalsh
epwalsh / ci.yml
Last active November 3, 2020 10:39
Python GitHub Actions with pip cache
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/cache@v2
with:
@skylord123
skylord123 / grafana-power-usage-dashboard.json
Created October 18, 2019 00:53
grafana-power-usage-dashboard
{
"__inputs": [
{
"name": "DS_GOLIATH_INFLUXDB",
"label": "goliath influxdb",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@xypnox
xypnox / setup.md
Last active July 27, 2020 12:18
Setup ESLint for React and VSCode
@kbychkov
kbychkov / gh_pages.sh
Last active November 18, 2023 15:30
Working with gh-pages as an orphan branch
# Create `gh-pages` branch from scratch
cd <dir>
git init
git remote add origin <url>
git checkout --orphan gh-pages
git add .
git commit -m "build 1.0.0"
git push origin gh-pages
@coin8086
coin8086 / using-proxy-for-git-or-github.md
Last active October 25, 2024 07:33
Use Proxy for Git/GitHub

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
@StefanFabian
StefanFabian / .anaconda_with_ros_wrapper.bash
Last active March 7, 2023 16:49
Bash script to use Anaconda with ROS
### This script wraps all executables in the anaconda bin folder so that they can be used without adding Anaconda
### to the path which would break some functionality of ROS (Robot Operating System)
###
### The commands e.g. jupyter notebook will cause the script to add anaconda to the path, start jupyter notebook
### and after jupyter notebook terminated remove anaconda from the path again
###
### Notable commands:
### * release-the-snake Adds conda to the path and removes all aliases defined by this script
### Conda will stay in the PATH until the end of the session (terminal is closed) or
### until "cage-the-snake" is called
@hovren
hovren / CMakeLists.txt
Created December 12, 2017 15:35
pybind11 with CMake and setup.py
# Build a Python extension module using pybind11
# pybindings_add_module(<module>)
# Here <module> should be the fully qualified name for the module,
# e.g. pybindings_add_module(foo.bar._baz)
# <module> becomes the target name in case you wish to do something to it later
# The source for the binding *must* be placed in src/pybindings/{relpath}/py{name}.cc
# E.g. for module=foo.bar._baz -> src/pybindings/bar/py_baz.cc
function(pybindings_add_module module)
set(target_name ${module})
string(REPLACE "." "/" modpath ${module})
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 28, 2024 20:51
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)