Skip to content

Instantly share code, notes, and snippets.

View danydodson's full-sized avatar
🏠
Working from home

dany danydodson

🏠
Working from home
View GitHub Profile
@danydodson
danydodson / gist:d0001de0d3479141b47c258d24365ed7
Created May 24, 2024 10:50
Open Files with Terminal Vim by default [mac, iterm]

If you want your terminal vim to open files you double click, follow the following steps (MacOS only):

  1. Open Automator
  2. Select Application
  3. Copy the attached file
  4. Save and set as default for opening files

Multiple files are opened in vim tabs. If there is already a vim instance running, files are opened in it.

Keybase proof

I hereby claim:

  • I am danydodson on github.
  • I am igore (https://keybase.io/igore) on keybase.
  • I have a public key ASCCqBENYZouBsa2-lyDCyNm_2hKsV3ht2m-F8fBkKapIAo

To claim this, I am signing this object:

[
{
"title": "Oil onkey Script telegram exchange group",
"url": "https://t.me/UserscriptPlus"
}
]
@danydodson
danydodson / userjs-base.js
Last active February 21, 2025 08:36
TamperMonkey
// https://gist.github.com/danydodson/def9372092dcbcb10b1cddec018db3c5
// Dany Dodson <danydodson@gmail.com>
ljs.addAliases({
jQuery:'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js',
copy:'https://cdn.jsdelivr.net/gh/zenorocha/clipboard.js@master/dist/clipboard.min.js',
juicer:'https://cdnjs.cloudflare.com/ajax/libs/juicer/0.6.14/juicer-min.js',
timeago:'https://cdnjs.cloudflare.com/ajax/libs/timeago.js/2.0.3/timeago.min.js',
iframe:'https://cdn.jsdelivr.net/gh/jae-jae/iframe-sandbox@main/iframe-sandbox.js',
vue:'https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.js',
psl:'https://cdn.jsdelivr.net/gh/wrangr/psl@master/dist/psl.min.js',
@danydodson
danydodson / review-checklist.md
Last active February 21, 2025 08:36
frontend checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@danydodson
danydodson / disable.sh
Last active February 21, 2025 08:36
disable macos #$!@
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@danydodson
danydodson / brew-packages.md
Last active February 21, 2025 08:39
brew packages

Top brew packages

node: Platform built on V8 to build network applications

git: Distributed revision control system

wget: Internet file retriever

yarn: JavaScript package manager

@danydodson
danydodson / web-servers.md
Last active February 21, 2025 08:39
web servers

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

python -m SimpleHTTPServer 8000
@danydodson
danydodson / header-logging.conf
Last active February 21, 2025 08:39
nginx header logs
# Load JavaScript code from here
js_include conf.d/header_logging.js;
# Fill variable from JS function
js_set $access_log_with_headers kvAccessLog;
# Define special log format
log_format kvpairs $access_log_with_headers;
server {
@danydodson
danydodson / cookie_signing.js
Last active February 21, 2025 08:39
nginx cookies