Skip to content

Instantly share code, notes, and snippets.

.css-selector {
    background: linear-gradient(86deg, #ff8fb0, #f90009);
    background-size: 400% 400%;
    -webkit-animation: danger-animated 3s ease infinite;
    -moz-animation: danger-animated 3s ease infinite;
    -o-animation: danger-animated 3s ease infinite;
    animation: danger-animated 3s ease infinite;
}
@-webkit-keyframes danger-animated {
    0%{background-position:0% 56%}
@ros-luc
ros-luc / draw_box.py
Created September 2, 2022 11:45
Draw docking box in PyMol
"""
This script adds a function in PyMol that allows it to draw boxes.
You can specify the box center and its size. Very useful to represent docking boxes.
Usage:
1) In PyMol, go to File > Run script > this script
2) In the console, type:
draw_box center=(1, 2, 3), size=(20, 20, 20), spacing=1, linewidth=3, color=(255, 255, 255)
Center, size and color (RGB) must be written as tuples.
@cywang117
cywang117 / delete-device-config-var-overrides.js
Last active May 2, 2024 18:41
For large balena fleets, it may be necessary to run this from the Chrome dev console.
// This script may be run in a Chrome dev console, and will delete all the device config variables for each device in a fleet,
// which the exception of *_SUPERVISOR_DELTA or *_SUPERVISOR_DELTA_VERSION.
await (async () => {
// Make sure FLEET_ID is the ID of your fleet.
const FLEET_ID = 12345;
// Get devices in fleet
const devices = await sdk.models.device.getAllByApplication(FLEET_ID, {
$select: 'id',
});
@MOOOWOOO
MOOOWOOO / py-gitignore
Last active May 2, 2024 18:40
python pycharm gitignore
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
@anthonyray
anthonyray / kiosk.md
Created September 6, 2019 15:45
Turn your Raspberry Pi into a kiosk playing looping videos

An acquaintance needed a video kiosk that plays looping videos for an exposition booth. Since I have a bunch of Raspberry Pis lying around, I figured that it would be the perfect use case for using one of them.

Let's assume we start from scratch, with a unflashed, brand new SD card and your Raspberry Pi.

Installing the OS

Install a version of Raspbian that includes the desktop. You can head over to : https://www.raspberrypi.org/downloads/raspbian/ and follow the instructions.

Once the image is downloaded, you can burn it to your SD card with tools like Etcher (https://www.balena.io/etcher/)

@diego3g
diego3g / settings.json
Last active May 2, 2024 18:37
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@VermeilChan
VermeilChan / compile-aseprite-win.md
Last active May 2, 2024 18:36
Compile Aseprite from source code for Windows 11/10 x64
@Blackshome
Blackshome / sensor-light.yaml
Last active May 2, 2024 18:36
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@silassare
silassare / fix-esm-import-paths.js
Created July 21, 2022 09:58
Browse a folder and try to change all esm import `from`, by auto prefixing `.js` or `/index.js` only if this file exists.
import * as fs from 'fs';
import * as path from 'path';
// https://gist.github.com/lovasoa/8691344
async function* walk(dir) {
for await (const d of await fs.promises.opendir(dir)) {
const entry = path.join(dir, d.name);
if (d.isDirectory()) {
yield* walk(entry);
} else if (d.isFile()) {
@wyyder
wyyder / Create new user in Linux
Created January 25, 2020 07:19
To create a new user with sudo permission in Kali Linux
# Add user.
useradd -m username
# -m creates a home directory for the user.
# Set Password.
passwd username
# Set user group to sudo.
usermod -a -G sudo username
# -a option to add and ‘-G sudo’ means to add the user to the sudo group.