Skip to content

Instantly share code, notes, and snippets.

@chatchavan
chatchavan / README.md
Last active April 27, 2024 20:33
Setup Wifi on Raspberry Pi

Setup Wireless LAN for Raspberry Pi

The following guide describes how to setup Raspberry Pi to connect to Wifi. It was tested on the following environment:

  • Raspberry Pi Model B
  • Edimax EW-7811Un USB Wifi dongle
  • OS: Raspbian Jessie

Here are the overview of the steps:

@ruvnet
ruvnet / lion_x_rUv.py
Created April 12, 2024 21:28
LionAGI x rUv v0,01
import os
import asyncio
import subprocess
import importlib
import sys
from dotenv import load_dotenv
from lionagi import Session
from e2b_code_interpreter import CodeInterpreter
from llama_index.core import (
VectorStoreIndex,
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 20:30
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
@andreasvirkus
andreasvirkus / Editor.vue
Last active April 27, 2024 20:27
Tiptap emoji plugin for Klausapp
<template>
<div ref="editor" class="notranslate">
<div v-show="showSuggestions" ref="suggestions">
<template v-if="(filteredSuggestions || []).length">
<div
v-for="(item, index) in filteredSuggestions.slice(0, 10)"
:key="index"
:class="[$style.suggestion, navigatedSuggestionIndex === index && $style.selected]"
@click="selectSuggestion(item)"
>
@SKempin
SKempin / Git Subtree basics.md
Last active April 27, 2024 20:22
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@heaversm
heaversm / podquest-scraper-final.js
Created December 20, 2023 01:02
Puppeteer Scraper for Podquest
//import puppeteer
import puppeteer from 'puppeteer';
async function muiSelectOption(page, buttonSelector, optionValue) {
let liComponent;
let selectorSubstr = buttonSelector.substring(1); // Remove the leading '#' or '.'
if (optionValue) {
liComponent = `li[data-value="${optionValue}"]`;
} else {
liComponent = 'li:first-child';
@yowu
yowu / HttpProxy.go
Last active April 27, 2024 20:17
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 27, 2024 20:19
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@memphys
memphys / shortcuts.md
Created March 28, 2012 12:22
Bash Shortcuts For Maximum Productivity

source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/

Command Editing Shortcuts

  • Ctrl + a – go to the start of the command line
  • Ctrl + e – go to the end of the command line
  • Ctrl + k – delete from cursor to the end of the command line
  • Ctrl + u – delete from cursor to the start of the command line
  • Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
  • Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
@nobusugi246
nobusugi246 / gitlab-api.ps1
Last active April 27, 2024 20:07
GitLab API with PowerShell.
# https://docs.gitlab.com/ee/api/projects.html
# https://docs.gitlab.com/ee/api/issues.html
# https://docs.gitlab.com/ee/api/notes.html
# Project List
$r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/
$r | Sort-Object -Property id | Format-Table -Property id, name
# Issues List
$r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/<xx>/issues