Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
carolineschnapp / currencies.liquid
Last active May 2, 2024 15:47
currencies.liquid
{% if settings.show_multiple_currencies %}
{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }}
{{ "jquery.currencies.min.js" | asset_url | script_tag }}
<script>
Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}';
var shopCurrency = '{{ shop.currency }}';
@JSerZANP
JSerZANP / ContentView.swift
Created March 4, 2021 14:01
communication between native(swiftUI) and wkwebview
import SwiftUI
import WebKit
struct WebView: UIViewRepresentable {
class Coordinator: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
var webView: WKWebView?
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
self.webView = webView
}
@heytulsiprasad
heytulsiprasad / tailwind.js
Created September 4, 2020 17:55
Config tailwind to desktop first approach
module.exports = {
theme: {
extend: {},
screens: {
xl: { max: "1279px" },
// => @media (max-width: 1279px) { ... }
lg: { max: "1023px" },
// => @media (max-width: 1023px) { ... }
@wizioo
wizioo / gitignore_per_git_branch.md
Last active May 2, 2024 15:42
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@advaith1
advaith1 / top bots.md
Last active May 2, 2024 15:40
The top Discord bots ranked by server count
Rank Bot Approximate Server Count Library
1 MEE6 21,600,000 Custom Python
2 Rythm 🪦 15,200,000 JDA
3 Groovy 🪦 10,400,000 JDA, Discord4J
4 carl-bot 🅱️ 9,770,000 Pycord
5 ProBot
@natew
natew / settings.json
Created August 10, 2023 23:54
my customize ui vscode
{
"apc.activityBar": {
"position": "bottom",
"hideSettings": true,
"size": 20
},
"apc.statusBar": {
"position": "editor-bottom",
"height": 22,
@keidarcy
keidarcy / apple.ts
Last active May 2, 2024 15:36
`Sign in with Apple` Nodejs typescript full example sample code
import axios from 'axios';
import * as jwt from 'jsonwebtoken';
import * as jwksClient from 'jwks-rsa';
import jwtDecode, { JwtHeader } from 'jwt-decode';
/**
* @see {@link https://github.com/expo/expo/blob/sdk-44/packages/expo-apple-authentication/src/AppleAuthentication.types.ts#L147}
* An object representing the tokenized portions of the user's full name. Any of all of the fields
* may be `null`. Only applicable fields that the user has allowed your app to access will be nonnull.
*/
@mfenniak
mfenniak / immich.nix
Last active May 2, 2024 15:30
NixOS configuration for Immich, based upon upstream docker-compose.yml
{ config, ... }:
let
immichHost = "immich.example.com"; # TODO: put your immich domain name here
immichRoot = "/tank/immich"; # TODO: Tweak these to your desired storage locations
immichPhotos = "${immichRoot}/photos";
immichAppdataRoot = "${immichRoot}/appdata";
immichVersion = "release";
immichExternalVolume1 = "/tank/BackupData/Google Photos/someone@example.com"; # TODO: if external volumes are desired
@mondain
mondain / public-stun-list.txt
Last active May 2, 2024 15:28
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478