I hereby claim:
- I am skoshy on github.
- I am skoshy (https://keybase.io/skoshy) on keybase.
- I have a public key ASBtmxmQjuASNdVEtNxQu39RyWhi8uqCUXgxe7rGi4Gi2go
To claim this, I am signing this object:
| <? | |
| /* | |
| * How to Use | |
| * | |
| * Supply a message to encrypt, optionally supply a salt as well, otherwise a random one will be created | |
| * Salt MUST be 22 characters to work reliably | |
| * You will receive an array with $arr['salt'] being the salt and $arr['digest'] being the encrypted result | |
| */ | |
| <? | |
| /* | |
| Using filter_var and check the domain part contains a dot | |
| From http://www.electrictoolbox.com/php-email-validation-filter-var-updated/ | |
| Check link for a series of tests | |
| */ | |
| function emailValidate($email) { | |
| return filter_var($email, FILTER_VALIDATE_EMAIL) && preg_match('/@.+\./', $email); |
| // this function takes in any parameter and can tell if it's "falsy" or not. | |
| // falsy means it's either false, 0, null, undefined, NaN, or an empty string/array/object | |
| // see the test cases at the bottom for a clearer picture | |
| function isFalsy(item) { | |
| try { | |
| if ( | |
| !item // handles most, like false, 0, null, etc | |
| || ( | |
| typeof item == "object" && ( |
| var scriptId = 'insta-dl'; | |
| function addLinks() { | |
| let els = document.querySelectorAll('._jjzlb, ._2tomm'); | |
| for (let i = 0; i < els.length; i++) { | |
| if (els[i].querySelector('.download_link')) | |
| continue; // skip if there already is a download link | |
| let obj, link; |
| /* | |
| Example - https://codepen.io/skoshy/pen/jmLyRm | |
| leading = string, or blank string '' which signifies first character | |
| trailing, string, or blank string '' which signifies last character | |
| */ | |
| function cutSubstr(string, leading, trailing) { | |
| let substr = ''; | |
| // first, let's get the primary index |
| /* Modified from http://blog.benoitvallon.com/data-structures-in-javascript/the-graph-data-structure/ */ | |
| function Graph() { | |
| this.vertices = []; | |
| this.edges = []; | |
| this.numberOfEdges = 0; | |
| this.addVertex = function(vertex) { | |
| this.vertices.push(vertex); | |
| this.edges[vertex] = []; |
| @echo off | |
| SET st3_path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
| SET st3_label=Open with Sublime Text 3 | |
| rem add it for all file types | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "%st3_label%" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3_path%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3_path% \"%%1\"" /f | |
| rem add it for folders |
| 1.3.1 |
I hereby claim:
To claim this, I am signing this object:
| ##### | |
| # Remember to `brew install reattach-to-user-namespace` for working copy support | |
| # Also install tpm - git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| # and then install tpm plugins - https://github.com/tmux-plugins/tpm#installing-plugins | |
| ##### | |
| # Plugins | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'tmux-plugins/tmux-resurrect' | |
| set -g @plugin 'tmux-plugins/tmux-continuum' |