Skip to content

Instantly share code, notes, and snippets.

@juleshenry
juleshenry / README-Template.md
Created March 29, 2019 22:22 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@JustinGrote
JustinGrote / PodBeanTranscription.psm1
Last active May 2, 2024 00:50
Podbean Podcast Transcription to Storage Account
#requires -module Az.CognitiveServices
using namespace Microsoft.Azure.Commands.Management.CognitiveServices.Models
function Get-PodBeanPodcast ($Name = 'powershellpodcast') {
Invoke-RestMethod https://feed.podbean.com/$Name/feed.xml
}
#region Base
function Connect-AzSpeech {
[OutputType([AzSpeechContext])]
@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentación oficial sobre Jest

  1. Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
## Where to find info and how to report on system extensions in macOS Catalina+
# Staged system extensions location in folder based on unique ID
/Library/SystemExtensions/
# Info on each
/Library/SystemExtensions/db.plist
Includes...
- state (enabled, activated, etc.)
- associated launchd plists
@jeffdonthemic
jeffdonthemic / httparty.rb
Last active May 2, 2024 00:45
HTTParty Examples
options = { :body =>
{ :username => 'my',
:password => 'password'
}
}
results = HTTParty.post("http://api.topcoder.com/v2/auth", options)
##
## example for post with papertrail and basic auth
##
@olih
olih / jq-cheetsheet.md
Last active May 2, 2024 00:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@dhh
dhh / linux-setup.sh
Last active May 2, 2024 00:39
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@ncalm
ncalm / excel-lambda-SUMPRODUCT2.txt
Created April 30, 2024 17:14
This Excel LAMBDA functions mimics SUMPRODUCT but allows a single 2D array as its only argument
IFOMITTED = LAMBDA(arg,then,IF(ISOMITTED(arg),then,arg));
SUMPRODUCT2 = LAMBDA(array, [axis],
SUM(IF(IFOMITTED(axis,0)=0, BYROW, BYCOL)(array, PRODUCT))
);
@mostafabahri
mostafabahri / decrypt.py
Last active May 2, 2024 00:37
Fernet encryption example with password
#!/usr/bin/env python3
from cryptography.fernet import Fernet
from kdf import derive_key
passphrase = b"hunter2"
f = Fernet(derive_key(passphrase))
with open('encrypted.txt', 'rb') as file:
encrypted = file.read() # binary read

Установка приватного пакета с помощью composer

  1. Необходимо создать ssh ключ и добавить его в настройки профиля GitHub, которому пренадлежит нужный репозиторий, если это не было сделано ранее.

Tip: вы можете использовать данный скрипт для создания и добавления SSH ключа.

  1. Указать url приватного репозитория в composer.json следующим образом:
"repositories": [