Skip to content

Instantly share code, notes, and snippets.

@flexgrip
flexgrip / pass-parameters-with-hubspot-forms.js
Created January 13, 2017 19:55
Pass the GET parameters / url variables / query string, from a hubspot form to your redirect/thank-you page. Apparently, to do this now, you have to manually define the redirect url in the script. It's not exposed in hsContext anymore.
/**
* Append the form data from a HubSpot form automatically
* to the redirect URL query parameters. These values can
* then be used on the form to modify the user experience
* of the Thank You page
*
* LICENSE
* Form redirect
* Written in 2015 by Mike Axiak <maxiak@hubspot.com>
* Updated in 2016 by Seth Meranda <seth.meranda@cune.edu>
@lohhans
lohhans / README-PTBR.md
Last active May 9, 2024 14:31 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.

@wumb0
wumb0 / delta_patch.py
Last active May 9, 2024 14:31
a script for applying MS patch deltas
from ctypes import (windll, wintypes, c_uint64, cast, POINTER, Union, c_ubyte,
LittleEndianStructure, byref, c_size_t)
import zlib
# types and flags
DELTA_FLAG_TYPE = c_uint64
DELTA_FLAG_NONE = 0x00000000
DELTA_APPLY_FLAG_ALLOW_PA19 = 0x00000001
@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 9, 2024 14:30
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@MasonSlover
MasonSlover / SFSymbolTitles.swift
Last active May 9, 2024 14:30
A .swift file with all SF Symbols titles in arrays, separated by category for app development and icon selection
//The following file has 20 arrays, allSymbols[] has the title of every SFSymbol, and the remaining 19 arrays have the following categories:
//communication, weather, objectsAndTools, devices, connectivity, transportation, human, nature, editing, textFormatting, media, keyboard, commerce, time, health, shapes, arrows, indicies, math
private var allSymbols = ["0.circle", "00.circle", "0.circle.fill", "00.circle.fill", "0.square", "00.square", "0.square.fill", "00.square.fill", "1.circle", "01.circle", "1.circle.fill", "01.circle.fill", "1.magnifyingglass", "1.square", "01.square", "1.square.fill", "01.square.fill", "2.circle", "02.circle", "2.circle.fill", "02.circle.fill", "2.square", "02.square", "2.square.fill", "02.square.fill", "3.circle", "03.circle", "3.circle.fill", "03.circle.fill", "3.square", "03.square", "3.square.fill", "03.square.fill", "4.alt.circle", "4.alt.circle.fill", "4.alt.square", "4.alt.square.fill", "4.circle", "04.circle", "4.circle.fill", "04.circle.fill", "4.square", "04.square", "4
@James-Leslie
James-Leslie / jupyter-envs.md
Created October 5, 2020 07:12
How to add conda environment to jupyter lab

How to add conda environments to JupyterLab

Credit for this goes to the Stack Overflow user Statistic Dean for his post on this question

1. Install nb_conda_kernels into your base environment

(base)$ conda install -c conda-forge nb_conda_kernels

2. Activate desired environment and install ipykernel

@jboner
jboner / latency.txt
Last active May 9, 2024 14:20
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@RealMuffinTime
RealMuffinTime / better_log4j_config.xml
Last active May 9, 2024 14:16
Custom log4j config for fabric servers using Better Log4j Config mod
<?xml version="1.0" encoding="UTF-8"?>
<!-- Custom log4j config for fabric servers -->
<!-- https://modrinth.com/mod/better-log4j-config -->
<!-- Entire configuration reloads from disk every 10 seconds -->
<Configuration status="WARN" packages="com.mojang.util,net.minecrell.terminalconsole.util" monitorInterval="10">
<Appenders>
<!-- System out -->
@mpppk
mpppk / clean_architecture.md
Last active May 9, 2024 14:16
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記: