Skip to content

Instantly share code, notes, and snippets.

View y4rr's full-sized avatar
💭
Learning stuff

y4rr

💭
Learning stuff
View GitHub Profile

Javascript Shorthand Coding Techniques

My (@pongstr) opinion about shorthand coding techniques

Shorthand code is not really a replacement for normal coding but it is very handy and useful in some cases. There are tons of opinions and debates around this but, again it all comes down what is necessary for your codebase and using it responsibly.

@y4rr
y4rr / Search my gists.md
Created April 3, 2022 01:59 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@y4rr
y4rr / README.MD
Last active January 23, 2020 16:08 — forked from nzec/README.MD
DeezLoader Offical Page

Deezloader Remix

(Recommended)

Available for macOS, Linux, Windows.

In the process of a rewrite. Final release will be v4.2.0. The repository might get DMCA' so, make Git Clones/Forks
You can compile yourself now to test for bugs (See rewrite branch in the Git repository)

#!/usr/bin/env bash
source ./lib_sh/echos.sh
source ./lib_sh/requirers.sh
bot "Hi! I'm going to install tooling and tweak your system settings. Here I go..."
if ! sudo grep -q "%wheel ALL=(ALL) NOPASSWD: ALL" "/etc/sudoers"; then
bot "I need you to enter your sudo password so I can install some things:"
sudo -v
@y4rr
y4rr / JerryLib.scptd
Created June 15, 2019 11:29 — forked from jerrykrinock/JerryLib.scptd
My personal utility library of AppleScript handlers, and some one-liners
-- To load this library, see section titled "-- Using a handler in a .scpt library" at the top of One_Liners.scpt.
on testJerryLib()
return 0
end testJerryLib
(* The bad thing about this handler is that it always asks the user for admin credentials whether or not they are actually needed to answer the question on the given path.
Obviously, you can remove the 'with adminstrator privileges'. Unfortunately, this will cause the method to return 'false' if an existing path cannot be probed because of bad permissions. I can't see any way to differentiate between inadequate permissions and nonexisting file because they both set errNumber = 54.
The -e checks for directories or files. To require that the given path be a directory, use -d. For file, use -f. For more variations, see:
http://www.cyberciti.biz/tips/find-out-if-file-exists-with-conditional-expressions.html *)
@y4rr
y4rr / iCloud-AddressBook-Recovery.sql
Created June 15, 2019 07:55 — forked from idiamant/iCloud-AddressBook-Recovery.sql
SQL Query to extract contacts from iCloud Backup - AddressBook.sqlitedb
--
-- How to recover iPhone contacts from Backup files:
--
-- Recover contacts from AddressBook.sqlitedb of iCloud and iTunes backup
-- I used https://github.com/horrorho/InflatableDonkey in order to download AddressBook.sqlitedb from iCloud Backup the last backups made,
-- in order to recover some of my Wife's contacts that got lost while reconnecting her iPhone to her work's Exchange server.
-- * If you have 2FA for your Apple Account, you won't be able to login to the iCloud using the tool above,
-- without supplying the 6 digit token.
-- Use the following method in order to login from cURL, and by that get the Two step token on your Apple Device
-- (Copy the next 4 lines to bash shell, modify the APPLE_ID and APPLE_PASS env vars to your own details):
@y4rr
y4rr / sqldump_to_csv.py
Created June 12, 2019 02:16 — forked from krypted/gist:605e0fb776d8761750c068234811a842
Convert a SQL Dump to CSV/Excel
#
#
# Exports the contents of a flat sql dump to csv files with the name of the table.csv and a xls representation of the database
# Requires Python 3.7 (from a Mac, first - brew install python3)
# Prior to running python3 -m pip install pandas
# Prior to running python3 -m pip install openpyxl
# Usage python3 sqlcsvxlsexport.py <sql dump file> <target directory>
# Send accolades for the script to krypted@me.com or hatemail to <devnull>
#
#