Skip to content

Instantly share code, notes, and snippets.

View jd-apprentice's full-sized avatar
❤️
Enjoying life!

Jonathan jd-apprentice

❤️
Enjoying life!
View GitHub Profile
@ScorpionConMate
ScorpionConMate / setup-node.md
Last active September 6, 2023 15:45
Setting Up Node.js Typescript Project with Eslint, Prettier & Live Reloading

Setting Up Node.js Typescript Project with Eslint, Prettier & Live Reloading

Setting up Typescript and live reloading in Node.js

First, setting up the file tsconfig.json to compile the typescript files into javascript files.

{
  "compilerOptions": {
 "module": "commonjs",
@Kyuubang
Kyuubang / docker.yml
Last active October 1, 2023 17:48
sample ansible playbook for install docker
- hosts: 'master, worker'
become: yes
tasks:
- name: update and install dependencies
apt:
name:
- apt-transport-https
- ca-certificates
- curl
@HirbodBehnam
HirbodBehnam / tg.sh
Last active June 25, 2024 05:50
A dead simple script to upload files on your server through Telegram bot
#!/bin/bash
# This is a simple script that takes some files as arguments and sends them to a special chat
# Just create a new bot at @BotFather and get your chat ID from @myidbot and enter them here
# You can also make a shortcut in '~/.bashrc' like "alias tg='bash /opt/scripts/tg.sh'"
# After that restart bash and use it like 'tg file1.txt file2.jpg'
# EDIT TOKEN and CHAT_ID:
TOKEN="TOKEN"
CHAT_ID="12341234"
# Make sure curl is installed
for arg in "$@"
@mraaroncruz
mraaroncruz / steps.md
Last active June 9, 2024 06:31
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999

@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active June 26, 2024 07:47
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do
@citrusui
citrusui / control
Last active November 26, 2023 01:02
Comprehensive Debian control file example
Package: com.example.package
Name: Example Package
Description: An example package.
This longer description will load when a depiction URL is not specified.
Author: Ms. Example <example@example.com>
Maintainer: Example, Inc. <example-inc@example.com>
Version: 1.0-1
Section: Addons (SpringBoard)
Pre-Depends: com.example.system
Depends: com.example.library
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'