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
function tryFromStorage() { | |
chrome.tabs.executeScript(null, { | |
code: ` | |
(function readFrom(result) { | |
([window.sessionStorage, window.localStorage]).forEach(function(storage) { | |
for (let i = 0; i < storage.length; ++i) { | |
const key = storage.key(i); | |
if (key.includes('access')) { | |
result.push(storage.getItem(key)); | |
} |
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
RestTemplate restTemplate = new RestTemplate(); | |
HttpHeaders headers = new HttpHeaders(); | |
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); | |
MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>(); | |
// add to map the form parameters | |
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(map, headers); | |
try { | |
restTemplate.postForEntity(url, request, String.class); | |
} catch (RestClientException e) { |
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
(function (context, constructorName, special) { | |
var Original; | |
Original = context[constructorName]; | |
context[constructorName] = function PatchedOriginal() { | |
var args; | |
args = Array.prototype.slice.call(arguments); | |
var returnObject; | |
if (special) { | |
returnObject = special(Original, PatchedOriginal, args); | |
} |
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
#!/bin/bash | |
# set -x | |
LXSS_PATH="$(/mnt/c/Windows/System32/cmd.exe /C echo %LOCALAPPDATA% | tr -d '\f\n\r')\\lxss" | |
# Show help | |
if [[ "$1" == "--help" ]] ; then | |
echo "$0 [--help] [absolute or relative path]" | |
exit | |
fi |
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
[ | |
"node_modules/jquery/dist/jquery.js", | |
"node_modules/popper.js/dist/umd/popper.js", | |
"node_modules/bootstrap/dist/js/bootstrap.js" | |
] |
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
/** | |
* TSLInt rule that ensures that a @Component has constructor, ngOnInit and ngOnDestroy in correct order. | |
*/ | |
import { | |
SourceFile, ClassDeclaration, MethodDeclaration, | |
createNodeArray, | |
isCallExpression, | |
isIdentifier, | |
Decorator, | |
SyntaxKind |
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
console.table(([].slice.call(document.querySelectorAll("[id]"))).map((e) => { e.style.outline = '1px solid red'; e.title = (e.id + ' ' + e.title); return {'id': e.id, 'element': e} })) |
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
<html> | |
<head> | |
<style> | |
html, | |
body { | |
top: 0; | |
left: 0; | |
} |
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
<html> | |
<head> | |
<style> | |
html, | |
body { | |
top: 0; | |
left: 0; | |
} |
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
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: nfs-client-provisioner | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: nfs-client-provisioner-runner |