Skip to content

Instantly share code, notes, and snippets.

View dvdantunes's full-sized avatar
🦊
sudo kitsune

David Antunes dvdantunes

🦊
sudo kitsune
View GitHub Profile
@markccalugay
markccalugay / .gitattributes
Last active February 4, 2023 15:27
UE4 Git LFS
# Unreal Engine file types
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
# Unreal Components
*.cubemap filter=lfs diff=lfs merge=lfs -text
# Audio Files
*.wav filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
@adrianlzt
adrianlzt / sharescreen
Last active January 7, 2022 07:14
Scripts to share only a portion of the screen
#!/bin/bash
# Modified version of https://github.com/Ashark/hliss/blob/master/vlc-hangouts
# Script to share a portion of the screen in VLC to be used by Chrome/Firefox to share the screen
# By default, when run, it asks to click in some window. The area of that window is what is going to be shared.
# If executed with "sharescreen area", it asks for a portion of the screen to be shared.
unset x y w h
# Old code to choose a monitor
@sheldonhull
sheldonhull / RClone-Fixing-Duplicates-GoogleDrive.ps1
Created August 20, 2018 04:50
Fixing Duplicates in Google Drive using Rclone to Dedupe
<#
RCLONE HELP
https://rclone.org/commands/rclone_dedupe/
Useful options I choose
--max-depth int
--dry-run
--log-file=PATH
--tpslimit 1 # can help prevent rate limiting errors you might see if you run verbose x2, ie `-vv`
--checkers 1
@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active May 23, 2024 08:34
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
@frntn
frntn / gcloud_commands
Last active February 27, 2024 11:10
all gcloud commands
gcloud auth
gcloud auth activate-refresh-token
gcloud auth activate-service-account
gcloud auth git-helper
gcloud auth list
gcloud auth login
gcloud auth print-access-token
gcloud auth print-refresh-token
gcloud auth revoke
gcloud components
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 24, 2024 09:21
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@ryanmcgrath
ryanmcgrath / JapaneseRegex.js
Created May 20, 2011 02:32 — forked from sym3tri/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation