Skip to content

Instantly share code, notes, and snippets.

View cheeseonamonkey's full-sized avatar
😅
Sweating, and smiling

Alexander H cheeseonamonkey

😅
Sweating, and smiling
View GitHub Profile
@cheeseonamonkey
cheeseonamonkey / gist:2987cd24b960d8b4e9b8d3a494110f73
Last active February 20, 2022 23:07
Stupid fetch (nomics crypto API)
<!DOCTYPE html>
<html>
<body>
<script>
//==================
//all possible valid symbols lol
let strAll =
@alexmustin
alexmustin / style.css
Last active February 10, 2023 02:47
Responsive / Fluid Typography -- CSS clamp() example
/*
* This will keep the element's font size between 24px and 42px.
* The middle value automatically calculates the font size between
* the Min and Max, using the browser window viewport width.
*/
.archive-title {
font-size: clamp(24px, calc(3vw + 1rem), 42px);
}
@ngocphamm
ngocphamm / counts only
Last active July 19, 2023 06:23
rg search results for FZF_DEFAULT_OPTS
.zsh/main.zsh:3
.tmux/plugins/tmux-fzf/scripts/session.sh:8
.tmux/plugins/tmux-fzf/scripts/command.sh:2
.tmux/plugins/tmux-fzf/scripts/window.sh:12
.tmux/plugins/tmux-fzf/scripts/keybinding.sh:2
.tmux/plugins/tmux-fzf/scripts/clipboard.sh:2
.tmux/plugins/tmux-fzf/scripts/process.sh:4
.tmux/plugins/tmux-fzf/scripts/.fzf-tmux:5
.tmux/plugins/tmux-fzf/scripts/pane.sh:16
Downloads/Temp/_local---custom/custom.plugin.zsh:1
@Xhynk
Xhynk / Code.gs
Last active February 6, 2023 00:18
A simple Google Apps Script to submit a Google Sheets powered timesheet: https://docs.google.com/spreadsheets/d/1D-YWjt_Zl8WrAuicmUKZsMzSpEOwv1vYL06dBdObyb4/
/*-----------------------------------*\
Written with 💖 by @Xhynk
Donate:
https://xhynk.com/#donate
\*-----------------------------------*/
// Example Google Sheets Timesheet: https://docs.google.com/spreadsheets/d/1D-YWjt_Zl8WrAuicmUKZsMzSpEOwv1vYL06dBdObyb4/
function submitTimesheet(e){
@sketchpunk
sketchpunk / Float32_Base64_Encoding_Decoding.js
Last active December 23, 2023 08:51
Encode Float32Array to base64 , then decode it back
let verts = new Float32Array( [ 0, 2, 0, -1, 0.2, 0, 1, 0.2, 0 ] );
let v = base64_test( verts );
function base64_test( fary ){
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ENCODING TEST
console.log("Origin Data", fary );
let uint = new Uint8Array( fary.buffer );
console.log( "Convert F32 to Uint8 : Byte Length Test", fary.length * 4, uint.length );
@arunkumar9t2
arunkumar9t2 / PreferencesX.kt
Last active September 6, 2023 15:20
Android PreferenceScreen DSL for using with androidx.preference framework.
@file:Suppress("NOTHING_TO_INLINE")
import android.content.Context
import androidx.annotation.StringRes
import androidx.fragment.app.Fragment
import androidx.preference.*
/**
* DSL marker for restricting access scope when [PreferencesBuilder.preference] is nested.
*/
@iPublicis
iPublicis / trelloinstall.sh
Last active July 16, 2024 16:40
Install Trello Linux Client
#!/bin/bash
# Your system should be 64 bits and check if the last version at https://github.com/danielchatfield/trello-desktop/ is 0.19
# If the current version is not 0.19 change the file name below accordingly
wget https://github.com/Racle/trello-desktop/releases/download/v0.2.0/Trello-linux-0.2.0.zip -O trello.zip
sudo mkdir /opt/trello
sudo unzip trello.zip -d /opt/trello/
sudo ln -sf /opt/trello/Trello /usr/bin/trello
echo -e '[Desktop Entry]\n Version=1.0\n Name=Trello Desktop\n Exec=/usr/bin/trello\n Icon=/opt/trello/resources/app/static/Icon.png\n Type=Application\n Categories=Application' | sudo tee /usr/share/applications/trello.desktop
@fnky
fnky / ANSI.md
Last active July 27, 2024 22:42
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@andrey-skl
andrey-skl / request.kt
Created June 21, 2018 21:45
KotlinJS Fetch with coroutines
package app
import kotlinx.coroutines.experimental.await
import org.w3c.fetch.*
import kotlin.browser.window
import kotlin.js.json
class FetchError(message: String, status: Number, response: dynamic) : Error(message)
suspend fun makeError(res: Response): FetchError {
@akarzim
akarzim / exa-aliases.zsh
Created March 20, 2018 16:07
Exa ZSH aliases
alias l='exa -1a' # Lists in one column, hidden files.
alias ll='exa -l' # Lists human readable sizes.
alias lr='ll -R' # Lists human readable sizes, recursively.
alias la='ll -a' # Lists human readable sizes, hidden files.
alias lm='la | "$PAGER"' # Lists human readable sizes, hidden files through pager.
alias lx='ll --sort=Extension' # Lists sorted by extension (GNU only).
alias lk='ll --sort=size -r' # Lists sorted by size, largest last.
alias lt='ll --sort=modified -r' # Lists sorted by date, most recent last.
alias lc='lt -m' # Lists sorted by date, most recent last, shows change time.
alias lu='lt -u' # Lists sorted by date, most recent last, shows access time.