Skip to content

Instantly share code, notes, and snippets.

@psyntium
psyntium / deploy.sh
Created January 24, 2019 00:20
Script to deploy app to CloudFoundry using Green-Blue deployment with existing manifest.yml
#!/bin/bash
APPNAME=$(egrep '^\- name:' manifest.yml | cut -c8- | xargs);
echo "Deploying ${APPNAME} Green-Blue Deployment";
cf push ${APPNAME}-new;
cf delete ${APPNAME} -f;
cf rename ${APPNAME}-new ${APPNAME};
echo "${APPNAME} Green-Blue Deployment Completed";
<xml id="toolbox" style="display: none">
<category name="Logic">
<block type="controls_if"></block>
<block type="logic_compare"></block>
<block type="logic_operation"></block>
<block type="logic_negate"></block>
<block type="logic_boolean"></block>
</category>
<category name="Loops">
<block type="controls_repeat_ext">
@psyntium
psyntium / scrap-image.js
Created October 12, 2017 01:52
Scrap image url from Google Image search site
// Copy and paste this lines of codes to the javascript console on the web browser
// It will print the urls of all the images displayed in the search result
var d = document.getElementsByClassName("rg_bx");
for(var i in d) {
var u = d.item(i).getElementsByTagName("a")[0].href;
u = u.substring(u.indexOf("=")+1, u.indexOf("&imgrefurl="))
console.log(decodeURIComponent(u))
}
@psyntium
psyntium / account.html
Last active July 2, 2017 06:25
Watson Banking Forms
<html>
<head>
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
<style>
input, button, textarea, select {
width: 100%;
padding: 10px;
}
input, button, select {
<html>
<body>
<form method="post" style="width: 100%">
{{inputs}}
<button type="submit" style="width: 100%; padding: 10px">Submit</button>
</form>
</body>
</html>
console.log("Hello World ABC!")
console.log("dfdsdsfd")