Skip to content

Instantly share code, notes, and snippets.

@sainnhe
sainnhe / gruvbox-material-alacritty.yml
Last active May 2, 2024 15:49
Gruvbox Material for Alacritty
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
@ChenyangGao
ChenyangGao / qrcode_cookie_115
Last active May 2, 2024 15:49
115扫码登录,可选择 app,获取 cookie

Configurar VSC para Django (Actualizado 03/2024)

Actualmente no es necesario configurar el proyecto en el directorio .vscode/settings.json, es mucho más fácil. Solo hay que seguir estos pasos:

  1. Antes de nada instalad estas extensiones en vuestro Visual Studio Code:
@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.
*/