Skip to content

Instantly share code, notes, and snippets.

@diego3g
diego3g / settings.json
Last active April 25, 2024 12:00
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": {
@6footfive
6footfive / index.html
Created April 25, 2024 11:54
React Smooth Section Navigator
<div id="root"></div>
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 25, 2024 11:57
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@ghalimi
ghalimi / XIRR.js
Created January 30, 2013 01:11
XIRR Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
// Some algorithms have been ported from Apache OpenOffice:
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@muink
muink / NCSI.md
Created November 20, 2021 09:15
常見網絡連接狀態指示器 (NCSI) 及強制門戶 (Captive Portal) 認證

常見網絡連接狀態指示器 (NCSI) 及強制門戶 (Captive Portal) 認證地址

常見網絡連接狀態指示器 (NCSI) 檢測用網絡地址

  • Windows:
    • Edge:
      • http(s)://edge.microsoft.com/captiveportal/generate_204 HTTP連接檢測, 有效值為204
    • 10-11:
      • http://www.msftconnecttest.com/connecttest.txt HTTP下載檢測, 有效值為Microsoft Connect Test
(defpackage :LISP-1.5-compiler
(:use :Common-Lisp)
(:shadow :length ; defined by the compiler
:reverse ; defined by the compiler
:member ; defined by the compiler
:map ; like mapl, and function is first argument
:exp ; used as special variable in the compiler
:compile ; defined by the compiler
:maplist ; takes function first
:mapcon ; takes function first
@liangfu
liangfu / ffmpeg.md
Created May 24, 2017 04:46 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@HStep20
HStep20 / tag_sonarr_radarr_media_with_overseer_users.py
Last active April 25, 2024 11:54
This script will read your Overseer data and create/apply user tags to all of your sonarr/radarr instances
"""
This script will read your Overseer data and create/apply user tags to all of your sonarr/radarr instances, then create a filter in each connected -arr application for the users you specify.
It is forward compatible with the future User Tagging feature of overseer, and formats the tag in the same 'id - lowercase username' pattern Overseer will
It only uses built in python libraries, so you should be able to download and run without much hassle.
NOTE: YOU ARE REQUIRED TO USE IP:PORT CONNECTIONS FOR YOUR SONARR/RADARR INSTANCES INSIDE OF OVERSEERR
This will NOT utilize docker-compose style hostnames at the moment, and I don't use them personally, so I don't see myself adding them
Steps to use:
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"