Skip to content

Instantly share code, notes, and snippets.

View machbio's full-sized avatar
💭
I may be slow to respond.

Sandeep Shantharam machbio

💭
I may be slow to respond.
  • Greater Boston Area
  • 23:03 (UTC -04:00)
View GitHub Profile
const { spawn } = require('child_process');
const videoUrls = ["YOUR-TIKTOK-VIDEO-THAT-YOU-WANT-TO-DOWNLOAD"];
async function downloadVideo(videoUrl) {
return new Promise((resolve, reject) => {
const ytDlpProcess = spawn('yt-dlp', [videoUrl]);
ytDlpProcess.stdout.on('data', (data) => {
console.log(`yt-dlp stdout: ${data}`);
@ih2502mk
ih2502mk / list.md
Last active April 21, 2025 17:47
Quantopian Lectures Saved
@btahir
btahir / twitter-pulse-checker.ipynb
Created June 21, 2019 09:13
Twitter-Pulse-Checker.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@indiesquidge
indiesquidge / small-prs.md
Created August 22, 2017 22:51
A case for smaller PRs

There are a myriad of benefits of smaller PRs with smaller line change deltas:

  • easier for reviewers, not only in sheer amount of code to review, but also in the ability to provide useful feedback or start a discussion around different architecture patterns
  • lower chances of bugs creeping in
  • simpler to refactor and iterate upon
  • encourages the code author to think more iteratively (e.g. what is the API I am trying to add right now? What will it look like when I'm done? Is what I'm doing extensible? Will it be suitable for future extensions, etc.)
  • more synonymous with a CI flow; it is better to ship multiple small things that can easily be cherry-picked or reverted than it is to ship big PRs that are harder to debug and roll back

One pitfall to small PRs is people feeling like they can't move ahead or build on top of code that is up for review.

@iMilnb
iMilnb / README.md
Last active January 18, 2024 08:08
AWS Terraform configuration: Stream CloudWatch Logs to ElasticSearch

Rationale

This snippet is a sample showing how to implement CloudWatch Logs streaming to ElasticSearch using terraform. I wrote this gist because I didn't found a clear, end-to-end example on how to achieve this task. In particular, I understood the resource "aws_lambda_permission" "cloudwatch_allow" part by reading a couple of bug reports plus this stackoverflow post.

The js file is actually the Lambda function automatically created by AWS when creating this pipeline through the web console. I only added a endpoint variable handling so it is configurable from terraform.

@bvis
bvis / Jenkinsfile
Last active March 31, 2025 22:37
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@arun-gupta
arun-gupta / readme.adoc
Last active March 22, 2020 12:21
Kubernetes Cluster on AWS
  1. kops: https://github.com/kubernetes/kops

    1. Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md

    2. Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/

    3. Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/

    4. Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/

    6. Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/

    7. Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/

  2. Tectonic (Terraform): http://github.com/coreos/tectonic-installer

@aparrish
aparrish / spacy_intro.ipynb
Last active March 14, 2025 21:43
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@denji
denji / README.md
Last active April 10, 2025 07:37 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000