Solution to su: must be run from a terminal when working in reverse shell (PHP).
echo "import pty; pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.pySolution to su: must be run from a terminal when working in reverse shell (PHP).
echo "import pty; pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.py| # vim:fileencoding=utf-8:ft=conf:foldmethod=marker:foldlevel=0 | |
| # To reload config manually: kitty @ load-config | |
| #: Fonts {{{ | |
| #: Victor Mono is an excellent coding font with beautiful italics, | |
| #: particularly useful for code syntax highlighting and comments | |
| font_family Victor Mono Medium | |
| bold_font Victor Mono Bold | |
| italic_font Victor Mono Medium Italic |
The code extension does not allow me to open folder with vscode from command line.
Solution: Add the following function to ~/.config/fish/config.fish
function vcode
open -a "Visual Studio Code.app" $argv
end
then using vcode $folder to open $folder
| { | |
| "workbench.colorTheme": "Gruvbox Light (Hard)", | |
| "files.trimTrailingWhitespace": true, | |
| "editor.renderWhitespace": "all", | |
| "[html]": { | |
| "editor.defaultFormatter": "vscode.html-language-features" | |
| }, | |
| "[jsonc]": { | |
| "editor.defaultFormatter": "esbenp.prettier-vscode" | |
| }, |
| Source ```https://www.hass.de/files/nodes/story/58/setupiis8forsslperfectforwardsecrecy_v14.ps1``` | |
| # Copyright 2014, Alexander Hass | |
| # http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12 | |
| # | |
| # Version 1.4 | |
| # - RC4 has been disabled. | |
| # Version 1.3 | |
| # - MD5 has been disabled. |
| /* | |
| * IF YOU WANT TO JUST ACCESS THE CAMERA INSTANCE SO THAT YOU CAN SET ANY OF THE PARAMETERS, VISIT THE FOLLOWING LINK: | |
| * https://gist.github.com/Gericop/364dd12b105fdc28a0b6 | |
| */ | |
| /** | |
| * <p> | |
| * Sets the Mobile Vision API provided {@link com.google.android.gms.vision.CameraSource}'s | |
| * focus mode. Use {@link Camera.Parameters#FOCUS_MODE_CONTINUOUS_PICTURE} or | |
| * {@link Camera.Parameters#FOCUS_MODE_CONTINUOUS_VIDEO} for continuous autofocus. |
| #!/usr/bin/env python | |
| import time | |
| import boto | |
| import boto.ec2.elb | |
| import boto.utils | |
| from flask.ext.script import Manager | |
| from closeio.main import setup_app |
| $: (Dollar Colon) is basically a shorthand version of $LOAD_PATH. $: contains an array of paths that your script will search through when using require. | |
| $0 (Dollar Zero) contains the name of the ruby program being run. This is typically the script name. | |
| $* (Dollar Splat) is basically shorthand for ARGV. $* contains the command line arguments that were passed to the script. | |
| $? (Dollar Question Mark) returns the exit status of the last child process to finish. | |
| $$ (Dollar Dollar) returns the process number of the program currently being ran. | |
| $~ (Dollar Tilde) contains the MatchData from the previous successful pattern match. | |
| $1, $2, $3, $4 etc represent the content of the previous successful pattern match. | |
| $& (Dollar Ampersand) contains the matched string from the previous successful pattern match. | |
| $+ (Dollar Plus) contains the last match from the previous successful pattern match. | |
| $` (Dollar Backtick) contains the string before the actual matched string of the previous successful pattern match. |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()| // encode(decode) html text into html entity | |
| var decodeHtmlEntity = function(str) { | |
| return str.replace(/&#(\d+);/g, function(match, dec) { | |
| return String.fromCharCode(dec); | |
| }); | |
| }; | |
| var encodeHtmlEntity = function(str) { | |
| var buf = []; | |
| for (var i=str.length-1;i>=0;i--) { |