Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
Having fun

Andrew Orsich anorsich

👻
Having fun
View GitHub Profile
@anorsich
anorsich / submit-funnelfly-form.js
Created Feb 9, 2020
An example of how to connect any form to Funnelfly.
View submit-funnelfly-form.js
// Documentation is available here https://docs.funnelfly.com/reference#section-on-form-submit
// The form is: https://www.babypalooza.com/contact-us/
// Form field names is used to get fields and map them to funnelfly fields.
// Funnelfly's custom fields are used to store inquery message, website and type.
<script type="text/javascript">
var form = document.getElementById('hsForm_c7ad58f4-b6df-4b48-bfa6-596cd823dbfd');
funnelfly.onFormSubmit(form, ({
email,
View maqpie.html
// Example JS for adding few chats within one application
<script>
var MP = {
data: {
appId: "5ac4cd4289c8710028618d84", // your app id. it's same for each user. required
user: {
username: "UserName1", // required
email: "UserName1@gmail.com", // required
vendorUserId: "UserName1" // unique user id. required
},
@anorsich
anorsich / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@anorsich
anorsich / wait.sh
Created Sep 8, 2014
Wait for amazon elastic beanstalk environment become green.
View wait.sh
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop | cut -d":" -f2| sed -e 's/^ *//g' -e 's/ *$//g' `
echo ${temp##*|}
}
echo "Waiting 20 seconds before start checking"
sleep 20s
echo "Press [CTRL+C] to stop.."
@anorsich
anorsich / deploy.sh
Last active Aug 29, 2015
Deploy node.js app to amazon elasticbeanstalk
View deploy.sh
APP_NAME="sample"
ENV_NAME="sample-production"
#%build.vcs.number% is sha of commit taken from TeamCity
APP_VERSION=$(date -u +"%%FT%%T-UTC")-${ENV_NAME}-`%build.vcs.number%`
echo APP_VERSION is ${APP_VERSION}
#remove previous build if exists
rm -f appName.zip
You can’t perform that action at this time.