Skip to content

Instantly share code, notes, and snippets.

@seanh
seanh / netrw.md
Last active April 23, 2024 18:13
Netrw Cheatsheet (Vim's Built-in Directory Browser)

Netrw Cheatsheet (Vim's File Browser)

See also:

  • vinegar.vim, which makes - open netrw in the directory of the current file, with the cursor on the current file (and pressing - again goes up a directory). Vinegar also hides a bunch of junk that's normally at the top of netrw windows, changes the default order of files, and hides files that match wildignore.

    With vinegar, . in netrw opens Vim's command line with the path to the file under the cursor at the end of the command. ! does the same but also prepends ! at the start of the command. y. copies the absolute path of the file under the cursor. ~ goes to your home dir. Ctrl+6 goes back to the file (buffer) that you had open before you opened netrw.

To launch netrw:

# sleepy flower girl
(◡ ‿ ◡ ✿)
# y u no
ლ(ಠ益ಠლ)
# smiling breasts
(^人^)
# flipping tables
@VirtuBox
VirtuBox / microsoft-dns-block.txt
Created July 22, 2019 14:43
Blocking Microsoft DNS hosts file
0.0.0.0 feedback.microsoft-hohm.com
0.0.0.0 search.msn.com
0.0.0.0 a.ads1.msn.com
0.0.0.0 a.ads2.msn.com
0.0.0.0 a.rad.msn.com
0.0.0.0 ac3.msn.com
0.0.0.0 ads.msn.com
0.0.0.0 ads1.msn.com
0.0.0.0 b.ads1.msn.com
0.0.0.0 b.rad.msn.com
@milannankov
milannankov / easy.controller.js
Last active April 23, 2024 18:10
Using Kendo UI in SAP UI5 Applications
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/model/json/JSONModel",
], function (Controller, JSONModel) {
"use strict";
return Controller.extend("simple-app.controller.View1", {
onAfterRendering: function () {
var colorPickerId = this.byId("colorPicker").sId;
@ky-zo
ky-zo / FloatingMenu.tsx
Created April 23, 2024 09:05
FloatingMenu effect from CopyCopter.ai
//Parent of this component is a div with "fixed" className
'use client'
import { motion, useTransform, useScroll, useSpring, useMotionValueEvent } from 'framer-motion'
const ScrollFloatingAnimation = ({ children }: { children: React.ReactNode }) => {
const { scrollYProgress } = useScroll()
const smoothProgress = useSpring(scrollYProgress, {
mass: 0.5,
@James-Ansley
James-Ansley / pi5_fan_controller.py
Last active April 23, 2024 18:08
Raspberry Pi 5 Auto Fan Controller
from enum import Enum
import time
TEMP_PATH = "/sys/devices/virtual/thermal/thermal_zone0/temp"
FAN_PATH = "/sys/class/thermal/cooling_device0/cur_state"
class FanSpeed(Enum):
OFF = 0
LOW = 1
@lopspower
lopspower / README.md
Last active April 23, 2024 18:05
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

According to all known laws
of aviation,
there is no way a bee
should be able to fly.
Its wings are too small to get
its fat little body off the ground.
@debxp
debxp / xfce-add-launcher.sh
Created January 11, 2020 19:59
A script to add launchers to Xfce panel
#!/usr/bin/env bash
# NOTE: Xfce panel position scheme -------------------------------------------
# (6)--(11)---(9)--(11)--(2)
# | |
# (5) (1)
# | |
# (7) (0) (3)
# | |
@disler
disler / README.md
Last active April 23, 2024 18:01
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.