Skip to content

Instantly share code, notes, and snippets.

View amolc's full-sized avatar
🎯
Focusing

Amol amolc

🎯
Focusing
View GitHub Profile
var connect = require('connect');
var app = connect();
var bodyParser = require('body-parser');
var serveStatic = require('serve-static');
var vhost = require('vhost');
var path = require('path');
var customerwebsite = connect();
var admin = connect();
var systemadmin = connect();
var publicwebsite = connect();
@amolc
amolc / push.js
Last active October 9, 2016 05:18
Ios Push Notification
const apn = require(“apn”);
let note = new apn.Notification({
 alert: “Amol Chawathe is now on Medium”,
});
let tokens = [“2727272727263636363”, “setyourphonetoken”];
let service = new apn.Provider({
 cert: “certificate/Yourapp-Dev-Cer.pem”,
 key: “certificate/Yourapp-Dev-Key.pem”,
});
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php56
# Fix PEAR permissions
chmod -R ug+w `brew --prefix php56`/lib/php
pear config-set php_ini /usr/local/etc/php/5.6/php.ini
# Fix PEAR config and upgrade
@amolc
amolc / pushCertification.txt
Last active June 6, 2016 13:10 — forked from kublaios/gist:f01cdf4369c86ddd6d71
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
# Convert the .cer file into a .pem file:
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem
# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem
# At this point it’s a good idea to test whether the certificate works.
/* global angular */
/**
* https://gist.github.com/mlynch/dd407b93ed288d499778
*
* the HTML5 autofocus property can be finicky when it comes to dynamically
* loaded templates and such with AngularJS. Use this simple directive to tame
* this beast once and for all.
*
* Usage:
* <input type="text" autofocus>
#!/bin/bash
version=$1
build=$2
buildtype=$3
projectname=Popety
python cordovaversion.py $version $build
if [ "$buildtype" == "uat" ]
then
echo "We are building for UAT"
mv www/js/config.uat.js www/js/config.js
@amolc
amolc / build.sh
Created September 28, 2015 03:42
#/bin/sh
rm "platforms/ios/build/Popety.ipa" #deletes previous ipa
xcodebuild -scheme Popety clean archive -archivePath build/Popety
xcodebuild -exportArchive -exportFormat ipa -archivePath "build/Popety.xcarchive" -exportPath "build/Popety.ipa" -exportProvisioningProfile "popety"
@amolc
amolc / package.json
Last active September 25, 2015 08:51
{
"name": "transparent-1.0",
"version": "0.0.100",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-cli": "~0.1.13",
"grunt-html2js": "~0.2.7",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-connect": "~0.8.0",
rm "platforms/ios/build/Popetybidding.ipa" #deletes previous ipa
xcodebuild -scheme Popety clean archive -archivePath build/Popety
xcodebuild -exportArchive -exportFormat ipa -archivePath "build/Popety.xcarchive" -exportPath "build/Popety.ipa" -exportProvisioningProfile "popety"