Skip to content

Instantly share code, notes, and snippets.

@jay7134
jay7134 / cf7_convertkit_integration.php
Last active May 10, 2024 06:42
How to integrate Contact Form 7 with ConvertKit without using plugin
// Contact Form 7 & Convertkit integration
add_action( 'wpcf7_mail_sent', 'action_subscribe_to_convertkit', 10, 2 );
function action_subscribe_to_convertkit( $contact_form ) {
$title = $contact_form->title;
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
}
$first_name = $posted_data["your-name"];
$email = $posted_data["your-email"];
@takekazuomi
takekazuomi / csharp.gitignore
Created April 17, 2014 05:47
.gitignore for C#
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
@magickatt
magickatt / github_clone_using_token.sh
Created September 6, 2019 17:31
Clone a GitHub repository using a Personal Access Token
export GITHUB_USER=magickatt
export GITHUB_TOKEN=secret
export GITHUB_REPOSITORY=magickatt/ContainerisingLegacyApplicationsTalk
git clone https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
@jonasryberg
jonasryberg / Linsris_med_rokt_paprika_och_fankal.md
Last active May 10, 2024 06:41
Jag köpte en tryckkokare. Nu samlar jag på mig bra vegetariska recept att laga till i den.

Linser och ris med smak av rökt paprika och fänkål

Det här receptet ger en rejäl laddning av linser och ris som passar bra att servera till tofu, ha i en wrap eller kanske bara till stekta grönsaker. Ursprungsreceptet hittade jag här.

Ingredienser

  • 400 gram gröna linser
  • 350 gram basmatiris (vitt)
  • 1 liter grönsaksbuljong
@michaellihs
michaellihs / gitlab_access_token.md
Last active May 10, 2024 06:38
Create Gitlab Personal Access Token using curl

Create Gitlab Personal Access Token using curl

Prerequisites

  • You need a Gitlab server up and running
  • You need user credentials for a (admin) user on the Gitlab server
  • You need curl and Perl on your server
@mattiaz9
mattiaz9 / blurhashDataURL.ts
Last active May 10, 2024 06:36
Convert blurhash to a base64 DataURL string (no canvas or node-canvas)
import { decode } from "blurhash"
export function blurHashToDataURL(hash: string | undefined): string | undefined {
if (!hash) return undefined
const pixels = decode(hash, 32, 32)
const dataURL = parsePixels(pixels, 32, 32)
return dataURL
}
@gabe565
gabe565 / change-arc-icon.md
Last active May 10, 2024 06:34
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@Josscii
Josscii / weixin.md
Last active May 10, 2024 06:33
wechat_spider 原理扫盲帖

wechat_spider 原理扫盲帖

这篇文章旨在为刚接触 wechat_spider 的人提供一个快速了解这个项目基本原理的途径。

思路

首先我们随便进入一个微信公众号详情页。

@passiondroid
passiondroid / OpacityHex.markdown
Last active May 10, 2024 06:32
Opacity percentage in a Hex color code

Android uses hexadecimal ARGB values, which are formatted as #AARRGGBB. That first pair of letters, the AA, represent the alpha channel. You must convert your decimal opacity values to a hexadecimal value. Here are the steps:

Alpha Hex Value Process

  • Take your opacity as a decimal value and multiply it by 255. So, if you have a block that is 50% opaque the decimal value would be .5. For example: .5 x 255 = 127.5

  • The fraction won't convert to hexadecimal, so you must round your number up or down to the nearest whole number. For example: 127.5 rounds up to 128; 55.25 rounds down to 55.

  • Enter your decimal value in a decimal-to-hexadecimal converter, like http://www.binaryhexconverter.com/decimal-to-hex-converter, and convert your values.

@guilherme
guilherme / gist:9604324
Last active May 10, 2024 06:30
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then