Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / typescript-crash.ts
Last active November 23, 2025 12:54
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@reanim8ed
reanim8ed / sample.md
Last active May 30, 2021 09:21
[Linux commands] #linux #bookmarks

General

  • Restart service: sudo systemctl restart nginx
  • Change owner: chown username filename
  • Change permissions: chmod ugo+rwx foldername (U - user, g - group, o - other)
  • Remove package with its config files: apt-get purge vsftpd
  • Generate new SSh keys: ssh-keygen -t rsa -b 4096 -C "[email protected]"
  • Check user groups: groups username
  • Add user to group: gpasswd -a group username remove: gpasswd -d group username

MySql

@manuelreyes60
manuelreyes60 / linux.md
Last active March 14, 2025 08:38
Linux - Useful Linux commands

Linux Commands

More info here

  1. Run command as user:

sudo -u user command

Run ifconfig as www-data

@bradtraversy
bradtraversy / ssh.md
Last active September 30, 2025 20:16
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@bradtraversy
bradtraversy / myscript.sh
Last active October 9, 2025 10:52
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@kevinswiber
kevinswiber / express-gateway-configmap.yaml
Last active May 7, 2022 13:17
Files for Running Express Gateway in Kubernetes, Part 2
apiVersion: v1
kind: ConfigMap
metadata:
name: 'express-gateway-config'
data:
gateway.config.yml: |
http:
host: '*'
port: 8080
admin:
@janikvonrotz
janikvonrotz / Convert-DirectoryToJson.ps1
Last active May 4, 2025 19:06
Convert-DirectoryToJson #PowerShell #JSON
function Get-RandomHexString {
param($count)
$hex = '012345679ABCDEF'.ToCharArray()
$array = foreach($number in 1..$count ){ $hex | Get-Random}
return (($array) -join "").ToString().ToLower()
}
function Get-WikiType{
param($file)
@simonista
simonista / .vimrc
Last active November 14, 2025 09:53
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@alkavan
alkavan / linux_console_commands.sh
Last active August 29, 2023 11:23
All kind of useful Linux commands.
# I book marked some sites with useful Linux commands i found.
# then i noticed they were down, so i loaded them via google cache, and copied here.
# source: http://blog.urfix.com/
# source: http://www.pixelbeat.org/cmdline.html
# Enjoy!
# How to run process as background and never die
#
# nohup means: Do not terminate this process even when the stty is cut off.
# > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output).