Skip to content

Instantly share code, notes, and snippets.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 8, 2024 13:58
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@ianmustafa
ianmustafa / 0-preface.md
Last active May 8, 2024 13:57
PHP: cURL vs file_get_contents

PHP: cURL vs file_get_contents()

This is a very often asked question among PHP developers. This gist aims to answer it.

Case study

RajaOngkir API.

Benchmark

  • Done in DigitalOcean, cheapest droplet ($5), located in Singapore, using Ubuntu Server 18.04.3. (Referral link for anybody interested.)
  • System configured with (mostly) default configuration, using what's available from the package installation.
@siddydutta
siddydutta / script.js
Created August 29, 2021 07:14
HackerRank - JavaScript Basic Assessment - Country Codes
// HackerRank's NodeJS environment allows the `request` package.
const request = require('request');
function fetch(url) {
return new Promise((resolve, reject) => {
request(url, function (error, response, body) {
if (error)
reject(error)
else
resolve(body)
@jkstill
jkstill / proc_net_tcp_decode
Last active May 8, 2024 13:54
decode entries in /proc/net/tcp
Decoding the data in /proc/net/tcp:
Linux 5.x /proc/net/tcp
Linux 6.x /proc/PID/net/tcp
Given a socket:
$ ls -l /proc/24784/fd/11
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701]
@jordangarrison
jordangarrison / doom-emacs-python-black-formatter.el
Created May 28, 2020 16:53
Python Black Formatter with Emacs Doom
;; Python Black Formatter
;; package.el
(package! python-black)
;; config.el
(use-package! python-black
:demand t
:after python)
(add-hook! 'python-mode-hook #'python-black-on-save-mode)
@Iazzetta
Iazzetta / main.py
Created April 24, 2024 14:22
Python do Zero ao RPG
from random import randint
lista_npcs = []
player = {
"nome": "Guilherme",
"level": 1,
"exp": 0,
"exp_max": 30,
"hp": 100,
@nwade
nwade / README.md
Last active May 8, 2024 13:52
Remove SentinelOne Agent - macOS High Sierra/Mojave

Warning - use at your own risk

Remove SentinelOne agent from Mac

  1. Boot into Recovery Mode by holding Cmd+R during reboot
  2. Open Terminal from top menubar
  3. Run /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility to open Disk Utility
  4. If your startup disk is encrypted, use Disk Utility to mount it
  5. In Terminal, run chroot /Volumes/Macintosh\ HD
  6. Execute the deletion commands or script
@boucksontom
boucksontom / README.md
Created February 13, 2024 09:43 — forked from nwade/README.md
Remove SentinelOne Agent - macOS High Sierra/Mojave

Warning - use at your own risk

Remove SentinelOne agent from Mac

  1. Boot into Recovery Mode by holding Cmd+R during reboot
  2. Open Terminal from top menubar
  3. Run /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility to open Disk Utility
  4. If your startup disk is encrypted, use Disk Utility to mount it
  5. In Terminal, run chroot /Volumes/Macintosh\ HD
  6. Execute the deletion commands or script
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 8, 2024 13:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example