This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* 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] = []; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 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" && ( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <? | |
| /* | |
| 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <? | |
| /* | |
| * 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 | |
| */ | |
NewerOlder