This guy discovered a CodeWars hack that tricks the tests into passing.
class NilClass
def ==(_)
true
end
end
def mymethod| # from https://stackoverflow.com/questions/2180270/check-if-current-directory-is-a-git-repository | |
| [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1 |
| #!/bin/sh | |
| SESSION_NAME="dev" | |
| APP_PATH="~/path/to/stuff" | |
| APP="basename ${APP_PATH}" | |
| SERVER="server ssh address" | |
| tmux has-session -t ${SESSION_NAME} | |
| if [ $? != 0 ] |
This guy discovered a CodeWars hack that tricks the tests into passing.
class NilClass
def ==(_)
true
end
end
def mymethod| It was the best of times | |
| it was the worst of times | |
| it was the age of wisdom | |
| it was the age of foolishness | |
| it was the epoch of belief | |
| it was the epoch of incredulity | |
| it was the season of Light | |
| it was the season of Darkness | |
| it was the spring of hope | |
| it was the winter of despair |
| [ | |
| { | |
| "id": 1, | |
| "name": "Leanne Graham", | |
| "img": "https://randomuser.me/api/portraits/women/33.jpg", | |
| "username": "Bret", | |
| "email": "[email protected]", | |
| "address": { | |
| "street": "Kulas Light", | |
| "suite": "Apt. 556", |
| data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| <!-- | |
| For other language: Instead of `ace/mode/ruby`, Use | |
| Markdown -> `ace/mode/markdown` | |
| Python -> `ace/mode/python` | |
| C/C++ -> `ace/mode/c_cpp` | |
| Javscript -> `ace/mode/javascript` | |
| Java -> `ace/mode/java` | |
| Scala- -> `ace/mode/scala` |
| !!false === false | |
| !!true === true | |
| !!0 === false | |
| !!parseInt("foo") === false // NaN is falsy | |
| !!1 === true | |
| !!-1 === true // -1 is truthy | |
| !!"" === false // empty string is falsy | |
| !!"foo" === true // non-empty string is truthy |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Might as well ask for password up-front, right? | |
| sudo -v | |
| # Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| # Example: do stuff over the next 30+ mins that requires sudo here or there. | |
| function wait() { |
| @echo off | |
| :: Created by: Shawn Brink | |
| :: http://www.eightforums.com | |
| :: Tutorial: http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html | |
| :: To turn off Fast Startup | |
| REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /V HiberbootEnabled /T REG_dWORD /D 0 /F |