Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 20, 2024 12:04
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 20, 2024 12:02
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@dvygolov
dvygolov / downloadadlibraryvideo.js
Created February 2, 2024 14:32
Script adds Download button to videos in Facebook Ads Library
//FOR CONSOLOE
setInterval(function (){
var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
var video = videos[i];
if (video.parentNode.querySelector(".download-button")) {
continue;
}
import * as cdk from 'aws-cdk-lib';
import * as pipelines from 'aws-cdk-lib/pipelines';
import { Construct } from 'constructs';
import { PipelineStage } from '../pipeline-stage/pipeline-stage';
import { environments } from '../pipeline-config/pipeline-config';
export class PipelineStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
import * as apigw from 'aws-cdk-lib/aws-apigateway';
import * as cdk from 'aws-cdk-lib';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as nodeLambda from 'aws-cdk-lib/aws-lambda-nodejs';
import * as path from 'path';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
import * as apigw from 'aws-cdk-lib/aws-apigateway';
import * as cdk from 'aws-cdk-lib';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as nodeLambda from 'aws-cdk-lib/aws-lambda-nodejs';
import * as path from 'path';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
@nitinp14920914
nitinp14920914 / chatbot_verbal.py
Created May 19, 2020 05:48
Voice Chatbot in Python using Speech Recognition, NLTK, Google Text-to-Speech & Scikit-learn
#sudo apt-get install portaudio19-dev python-all-dev python3-all-dev
#sudo apt-get install portaudio19-dev
#pip install SpeechRecognition numpy gTTs sklearn
#pip install gTTS
#sudo apt-get install mpg123
import io
import random
import string
import warnings
@IlmariKu
IlmariKu / henkilotunnus.js
Created April 2, 2024 11:31
Henkilötunnus 2023 regex - new finnish social security number regex to identify
// Henkilötunnus 2023 regex - new finnish social security, regex to identify potential numbers
// Does not actually validate using the checksum
// Allows for case-insensitivity using the /i in the end.
// Includes test variables and tests, just copy the old-form regex or new one
const oldSsnRegex = /^(\d{6}[-+A]\d{3}\S{1})$/i;
/** Compatible with old-form */
const newSsnRegex = /^(\d{6}[a-zA-Z]\d{3}\S{1})$/i;
/** Old-form social security numbers
import * as cdk from 'aws-cdk-lib';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
import { RemovalPolicy } from 'aws-cdk-lib';
export interface StatefulStackProps extends cdk.StackProps {
bucketName: string;
}