Skip to content

Instantly share code, notes, and snippets.

@isasharafdin
isasharafdin / npm-downloads-increaser.mjs
Last active May 8, 2024 10:55
🚀 Instantly amplify your npm package's downloads with npm Downloads Increaser! This powerful script rapidly boosts your download stats, showcasing your package's popularity. Dive in and see your numbers soar! 🌟
import https from 'https'; // Import the https module to make HTTPS requests
import readline from 'readline'; // Import the readline module for interactive command line interfaces
// Create a readline interface for user input from the command line
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
/**
@krisjan-oldekamp
krisjan-oldekamp / google_bigquery_backup_views_scheduled_queries_git.py
Last active May 8, 2024 10:54
Backup BigQuery Views and Scheduled Queries to a Git repository using Python. Full article on stacktonic.com
############################################################
# Author Krisjan Oldekamp / Stacktonic.com
# Email krisjan@stacktonic.com
# Article https://stacktonic.com/article/backup-your-valuable-big-query-views-and-scheduled-queries-using-python
############################################################
import os
import git
import google.oauth2.service_account
from google.cloud import bigquery
@psaikali
psaikali / acf-gravity-forms-field.php
Created January 4, 2019 13:43
Populate ACF select field options with Gravity Forms to select a specific form
<?php
/**
* Populate ACF select field options with Gravity Forms forms
*/
function acf_populate_gf_forms_ids( $field ) {
if ( class_exists( 'GFFormsModel' ) ) {
$choices = [];
foreach ( \GFFormsModel::get_forms() as $form ) {
$choices[ $form->id ] = $form->title;
@gwangjinkim
gwangjinkim / install-and-start-postgresql-in-conda-locally
Last active May 8, 2024 10:44
How to install and run postgresql in conda
This gist I write, because I couldn't find step by step instructions
how to install and start postgresql locally (using conda within a conda environment - with the result
that you can run it without sudo/admin rights on your machine!)
and not globally in the operating system (which requires sudo/admin rights on that machine).
I hope, this will help especially people new to postgresql (and those who don't have sudo/admin rights on a specific machine but want
to run postgresql there)!
####################################
# create conda environment
@mondain
mondain / public-stun-list.txt
Last active May 8, 2024 10:43
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 8, 2024 10:42
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@atyachin
atyachin / Android_Emulator_AWS_EC2_ARM64_2022.txt
Last active May 8, 2024 10:41
Running headless android emulator on AWS EC2 Ubuntu instance (ARM64 / aarch64) - 2022
Android Emulator (ARM64) on EC2 - 2022
---------------------------------------
1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64
2. sudo apt update && sudo apt upgrade
3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb
4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk
6. sudo mv android-sdk /opt/
7. mkdir /opt/android-sdk/cmdline-tools/latest
8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error)