Skip to content

Instantly share code, notes, and snippets.

View EdThePro101's full-sized avatar
🏫
In High School

Edwin Pratt EdThePro101

🏫
In High School
View GitHub Profile
@Aurora12
Aurora12 / show-listen-ports.md
Last active December 1, 2021 12:33
Bash commands to show open TCP listening ports
# Debian
# Without sudo won't show pids and process names
sudo netstat -tlpn|grep LISTEN

# macOS
# Increase +c for better names visibility
# Without sudo only shows processes of the current user
sudo lsof -i -nP +c 30|grep LISTEN
@pedrouid
pedrouid / eslint-typescript.md
Last active August 11, 2022 14:31
Eslint + Prettier configuration for Typescript 3.7+ (2020)

Eslint + Prettier configuration for Typescript 3.7+ (2020)

  1. Install required dependencies
npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-standard prettier

# OR

yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-standard prettier
@EdThePro101
EdThePro101 / instalike.js
Last active January 7, 2021 18:10
A simple implementation of an Instagram bot that likes photos
// Copyright (c) 2020 Edwin Pratt
//
// The author of this file is not responsible for any problems this script may cause.
// This file was created as toy while learning JavaScript.
//
// ------------------------------
//
// I was always interested in bots and how they work. So I created this simple bot that will like photos on Instagram.
//
// To use this script, go to https://instagram.com and login.

Dev Setup

  1. Homebrew/terminal/bash
  2. OSX Productivity - Window Management/Quick Launcher/Hyperswitch
  3. OSX Settings - Dock/Finder
  4. Web Browser - Extensions - AdBlock, Privacy Badger, OneTab, JSONViewer, Stylus, Vue Devtools, React Devtools
  5. Node.js - nvm
  6. Code Editor - vs code
  7. Code Editor Extensions
  8. Break timer and Flux
@andreasonny83
andreasonny83 / .gitignore
Last active April 18, 2024 22:14
Gitignore template for JavaScript projects
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Runtime data
pids
*.pid
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 28 columns, instead of 24. in line 6.
AtomicNumber,Element,Symbol,AtomicMass,NumberofNeutrons,NumberofProtons,NumberofElectrons,Period,Group,Phase,Radioactive,Natural,Metal,Nonmetal,Metalloid,Type,AtomicRadius,Electronegativity,FirstIonization,Density,MeltingPoint,BoilingPoint,NumberOfIsotopes,Discoverer,Year,SpecificHeat,NumberofShells,NumberofValence
1,Hydrogen,H,1.007,0,1,1,1,1,gas,,yes,,yes,,Nonmetal,0.79,2.2,13.5984,8.99E-05,14.175,20.28,3,Cavendish,1766,14.304,1,1
2,Helium,He,4.002,2,2,2,1,18,gas,,yes,,yes,,Noble Gas,0.49,,24.5874,1.79E-04,,4.22,5,Janssen,1868,5.193,1,
3,Lithium,Li,6.941,4,3,3,2,1,solid,,yes,yes,,,Alkali Metal,2.1,0.98,5.3917,5.34E-01,453.85,1615,5,Arfvedson,1817,3.582,2,1
4,Beryllium,Be,9.012,5,4,4,2,2,solid,,yes,yes,,,Alkaline Earth Metal,1.4,1.57,9.3227,1.85E+00,1560.15,2742,6,Vaulquelin,1798,1.825,2,2
5,Boron,B,10.811,6,5,5,2,13,solid,,yes,,,yes,Metalloid,1.2,2.04,8.298,2.34E+00,2573.15,4200,6,Gay-Lussac,1808,1.026,2,3
6,Carbon,C,12.011,6,6,6,2,14,solid,,yes,,yes,,Nonmetal,0.91,2.55,11.2603,2.27E+00,3948.15,4300,7,Prehi
@komasaru
komasaru / prime_numbers.f95
Created April 20, 2017 05:04
Fortran code to compute prime numbers.
!****************************************************
! 素数一覧
! : 入力値以下の素数を全て出力する
!
! date name version
! 2017.04.20 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2017 mk-mode.com All Rights Reserved.
!****************************************************
!
/**
* Create a function that maps a value to a range
* @param {Number} inMin Input range minimun value
* @param {Number} inMax Input range maximun value
* @param {Number} outMin Output range minimun value
* @param {Number} outMax Output range maximun value
* @return {function} A function that converts a value
*
* @author Victor N. wwww.victorborges.com
* @see https://gist.github.com/victornpb/51b0c17241ea483dee2c3a20d0f710eb/

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.

@rxaviers
rxaviers / gist:7360908
Last active May 8, 2024 09:30
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: