Skip to content

Instantly share code, notes, and snippets.

View borjapazr's full-sized avatar
🐮
Éche o que hai!

Borja Paz Rodríguez borjapazr

🐮
Éche o que hai!
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active September 12, 2024 02:10
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@AlbertoBasalo
AlbertoBasalo / eslint.json
Last active September 22, 2022 12:38
ESLint configuration for clean TypeScript
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["prettier", "@typescript-eslint"],
"env": {
@acarril
acarril / global-protect.md
Last active August 9, 2024 14:09
GlobalProtect toggle (start/quit)

Regain control over the annoying GlobalProtect macOS install

I need to use GlobalProtect because it's becoming the only VPN to access resources in my school. The VPN client is simple enough, but it does two annoying things:

  1. Registers itself to autostart on login
  2. Doesn't provide you with a simple 'quit' action

Here I'll show you how I fixed both issues in macOS 12.2 (Monterey).

image

@sts10
sts10 / rust-command-line-utilities.markdown
Last active September 19, 2024 14:21
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@eneajaho
eneajaho / server-client-side-only.directive.ts
Created November 25, 2021 13:32
Server/Client side only - Angular Directive
import { Directive, Inject, NgModule, OnInit, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
/**
* Add the template content to the DOM based on platform
*/
@Directive({ selector: '[serverSideOnly]' })
export class ServerSideOnlyDirective implements OnInit {
@florestankorp
florestankorp / .eslintrc.js
Created April 19, 2021 13:52
ES Lint Rules
module.exports = {
ignorePatterns: ['.eslintrc.js'],
env: {
browser: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
@LeZuse
LeZuse / 00_README.md
Last active September 15, 2024 16:35
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@m-radzikowski
m-radzikowski / script-template.sh
Last active August 18, 2024 12:49
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@gear4s
gear4s / README.md
Last active September 29, 2022 21:16
Install NextCloud with OnlyOffice connectivity on GCP

Installation

Run this to create required files:

mkdir -p DocumentServer/{logs,data,lib}
touch gcp_service_account_credentials.json

Cloud configuration