Skip to content

Instantly share code, notes, and snippets.

@tanaikech
tanaikech / submit.md
Last active April 26, 2024 17:23
Adding Query Parameters to URL using Google Apps Script

Adding Query Parameters to URL using Google Apps Script

Updated on February 5, 2024

This is for adding the query parameters to the URL. These scripts can be also used for Javascript. When I created an endpoint with some query parameters, I had used the scripts of various patterns every time. Today, I prepared this sample script to unify them. If this is also useful for you, I'm glad.

Sample script (With V8 runtime):

String.prototype.addQuery = function (obj) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 26, 2024 17:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@oianmol
oianmol / platform.android.kt
Created May 19, 2023 10:01
Jetpack Compose Side Effect to update Android or iOS status-bar and navigation-bar color
@Composable
actual fun PlatformColors(statusBarColor: Color, navBarColor: Color){
val sysUiController = rememberSystemUiController()
SideEffect {
sysUiController.setSystemBarsColor(color = topColor)
sysUiController.setNavigationBarColor(color = bottomColor)
}
}
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 17:23
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 26, 2024 17:21
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@alexedwards
alexedwards / Makefile
Last active April 26, 2024 17:21
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@NikolaiRuhe
NikolaiRuhe / NRDelegateProxy
Created September 23, 2014 10:16
NRDelegateProxy is an Objective-C proxy class used for intercepting delegate callbacks.
// NRDelegateProxy is a base class for proxy objects that are used as intercepting
// delegates in other objects.
//
// NRDelegateProxy is subclassed to customize delegate behavior by selectively responding
// to some delegate methods while passing on other methods. It can thus be used to implement
// a chain of delegates where each delegate is responsible for some specific task.
//
// Below is an example using a UITextField. It sets up a chain of delegates that looks as follows:
//
// UITextField -> NRTextFilterProxy -> NRKeyboardHiderProxy -> ViewController
@wahengchang
wahengchang / m3nuPage.html
Created November 7, 2023 01:44
m3u8 html sample
<html lang="en">
<head>
<meta charset="utf-8" />
<title>sample m3u8 page</title>
</head>
<body>
<!-- CSS -->
<!-- file source is from: https://gist.github.com/Fazzani/8f89546e188f8086a46073dc5d4e2928 -->
<!-- this html page is from: https://stackoverflow.com/questions/19782389/playing-m3u8-files-with-html-video-tag -->