Skip to content

Instantly share code, notes, and snippets.

@nhatnx
nhatnx / curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate.md
Last active May 12, 2024 04:02
[WAMP] cURL error 60: SSL certificate: unable to get local issuer certificate

Need to do this in both php.ini files !!!

Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because I was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.

here's what I did

Download the certificate bundle.

Put it inside of C:\wamp64\bin\php\your php version\extras\ssl

@jonlabelle
jonlabelle / async_await_best_practices_cheatsheet.md
Last active May 12, 2024 03:58
C# Asynchronous Programming Guideline Cheat Sheet

Async Await Best Practices Cheat Sheet

Summary of Asynchronous Programming Guidelines

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers
Async all the way Don't mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text
@natanfelles
natanfelles / domain.tld.conf
Last active May 12, 2024 03:51
Nginx Virtual Host example to work on localhost
# Location: /etc/nginx/sites-available/domain.tld.conf
server {
listen 80;
# listen 443 ssl;
# include snippets/snakeoil.conf;
root /var/www/domain.tld/public;
index index.html index.php;
@nyancodeid
nyancodeid / README.md
Last active May 12, 2024 03:51
Make RESTful API with Google Apps Script and SpreadSheet

Google Script CRUD

By Ryan Aunur Rassyid

Simply create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.

@Jekins
Jekins / Markdown-docs.md
Last active May 12, 2024 03:47
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@branneman
branneman / primitive-reference-types-javascript.md
Last active May 12, 2024 03:45
Primitive Types & Reference Types in JavaScript

Primitive Types & Reference Types in JavaScript

An explanation of JavaScript's pass-by-value, which is unlike pass-by-reference from other languages.

Facts

  • JavaScript has 2 kinds of variable types: primitive and reference.
  • A fixed amount of memory is reserved after creation of every variable.
  • When a variable is copied, it's in-memory value is copied.
  • Passing a variable to a function via a call also creates a copy of that variable.

Primitive Types

@hiepxanh
hiepxanh / style.css
Last active May 12, 2024 03:42
using vscode extension: custom css and js loader
.editor-group-watermark > .letterpress{
background-image: url("https://raw.githubusercontent.com/hiepxanh/hiepxanh/master/Angular.png") !important;
opacity: .75;
}
@mdgrs-mei
mdgrs-mei / ShellIntegration.ps1
Last active May 12, 2024 03:36
Adds escape codes to the prompt for the shell integration
# Reference:
# https://devblogs.microsoft.com/commandline/shell-integration-in-the-windows-terminal/
param
(
[ValidateSet('WindowsTerminal', 'ITerm2')]
[String]$TerminalProgram = 'WindowsTerminal'
)
# Restore hooked functions in case this script is executed accidentally twice
@amosbastian
amosbastian / route.ts
Last active May 12, 2024 03:35
Lemon Squeezy webhook using the new route handler in Next.js 13
import crypto from "crypto";
import { listAllSubscriptions } from "lemonsqueezy.ts";
import { NextRequest } from "next/server";
// Put this in your billing lib and just import the type instead
type LemonsqueezySubscription = Awaited<ReturnType<typeof listAllSubscriptions>>["data"][number];
const isError = (error: unknown): error is Error => {
return error instanceof Error;
};