Skip to content

Instantly share code, notes, and snippets.

@scvnc
scvnc / problem.md
Last active May 2, 2024 23:09
git line ending debugging

So, you have LINE ENDING problem when commiting code with git between your coworkers...

Introduce a line ending policy to the git repo

$ echo "* text=auto" >.gitattributes
$ git read-tree --empty   # Clean index, force re-scan of working directory
$ git add .
$ git status        # Show files that will be normalized
$ git commit -m "Introduce end-of-line normalization"
@crosstyan
crosstyan / komorebic.ahk
Last active May 2, 2024 23:06
komorebic.ahk for AutoHotkey v2
#SingleInstance Force
WorkspaceNumber := 9
ArrayFromZero(Length){
temp := []
Loop Length {
temp.Push(A_Index-1)
}
return temp
@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@stevegrunwell
stevegrunwell / one-time-hooks.php
Created February 14, 2017 20:06
Enables action and filter callbacks to be executed exactly once via the WordPress Plugin API. https://engineering.growella.com/one-time-callbacks-wordpress-plugin-api/
<?php
/**
* Registers the "One time hook" functionality.
*
* Note that this file is intentionally in the *global* namespace!
*
* @author Growella
* @license MIT
*/
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 2, 2024 23:01
Hyperlinks in Terminal Emulators
@rebane2001
rebane2001 / discord-pin-compressor.html
Last active May 2, 2024 23:01
This is a simple app that converts Discord pins to Discord messages, which is useful for example when you've reached the pin limit and wish to have more room for new pins.
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Pin Compressor</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Pin Compressor">
<meta name="author" content="rebane2001">
<style>
/*
@ChadFulton
ChadFulton / markov_autoregression.ipynb
Created June 7, 2016 20:52
Statsmodels: Markov switching notebooks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@daverich204
daverich204 / Code.gs
Created April 16, 2024 01:58
Yahoo Finance Api V8 Example Google App Script
function yahooF(ticker) {
const url = `https://query1.finance.yahoo.com/v8/finance/chart/${ticker}`;
const res = UrlFetchApp.fetch(url, {muteHttpExceptions: true});
const contentText = res.getContentText();
const data = JSON.parse(contentText);
// Check if the result exists and has data
if (data && data.chart && data.chart.result && data.chart.result.length > 0) {
const regularMarketPrice = data.chart.result[0].meta.regularMarketPrice;
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active May 2, 2024 22:56
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory: