I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
| # vim style tmux config | |
| # use C-a, since it's on the home row and easier to hit than C-b | |
| set-option -g prefix C-a | |
| unbind-key C-a | |
| bind-key C-a send-prefix | |
| set -g base-index 1 | |
| # Easy config reload | |
| bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |
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
| <?php | |
| function ldap_auth($ldap_id, $ldap_password){ | |
| $ds = ldap_connect("ldap.iitb.ac.in") or die("Unable to connect to LDAP server. Please try again later."); | |
| if($ldap_id=='') die("You have not entered any LDAP ID. Please go back and fill it up."); | |
| if($ldap_password=='') die("You have not entered any password. Please go back and fill it up."); | |
| $sr = ldap_search($ds,"dc=iitb,dc=ac,dc=in","(uid=$ldap_id)"); | |
| $info = ldap_get_entries($ds, $sr); | |
| $roll = $info[0]["employeenumber"][0]; | |
| //print_r($info); | |
| $ldap_id = $info[0]['dn']; |
This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.
I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.
🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.
The rest of the README is left for historical purposed.
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
| // 4 spaces to 2 spaces | |
| %s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g | |
| // Tab to 2 spaces | |
| :%s/\t/ /g |
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
| <?php | |
| function getfromweb($url, $username = null, $password = null) { | |
| $opts = array('http' => | |
| array( | |
| 'method' => 'GET', | |
| 'header' => "Authorization: Basic ".base64_encode("$username:$password")."\r\n") | |
| ); | |
| $context = stream_context_create($opts); | |
| $result = file_get_contents($url, false, $context); | |
| return $result; |
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
| Puts on glasses: | |
| (•_•) | |
| ( •_•)>⌐■-■ | |
| (⌐■_■) | |
| Takes off glasses ("mother of god..."): | |
| (⌐■_■) | |
| ( •_•)>⌐■-■ |
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
| //Works on http://web.whatsapp.com | |
| // With little creativity and some coding skills you can do a lot of things using this code to annoy some one. | |
| function dispatch(target, eventType, char) { | |
| var evt = document.createEvent("TextEvent"); | |
| evt.initTextEvent (eventType, true, true, window, char, 0, "en-US"); | |
| target.focus(); | |
| target.dispatchEvent(evt); | |
| } | |
| function triggerClick() { | |
| var event = new MouseEvent('click', { |
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
| // With little creativity and some coding skills you can do a lot of things using this code to annoy some one. | |
| // works on the first chat box opened. only works in google chrome! | |
| function dispatch(target) { | |
| var evt = document.createEvent("Event"); | |
| evt.initEvent("keydown",true,true); | |
| evt.keyCode = 13; | |
| evt.which = 13; | |
| target.dispatchEvent(evt); | |
| } |
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
| javascript: (function () { | |
| // the css we are going to inject | |
| var css = | |
| "html {" + | |
| " -webkit-filter: invert(100%);" + | |
| " -moz-filter: invert(100%);" + | |
| " -o-filter: invert(100%);" + | |
| " -ms-filter: invert(100%);" + | |
| "}", | |
| head = document.getElementsByTagName("head")[0], |