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
| # Install NodeJS 4.x | |
| curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| # Install NodeJS 5.x | |
| curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| # Optional - Needed to compile and install native add-ons | |
| sudo apt-get install -y build-essential |
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
| # Save data using Parse API | |
| curl -X POST \ | |
| -H "X-Parse-Application-Id: YOUR_APP_ID" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"name":"Niraj Shah","score":"1337"}' \ | |
| http://localhost:1337/parse/classes/GameScore | |
| # Retrieve all the entries in GameScore | |
| curl -X GET \ | |
| -H "X-Parse-Application-Id: YOUR_APP_ID" \ |
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
| var express = require('express'); | |
| var ParseServer = require('parse-server').ParseServer; | |
| var app = express(); | |
| // Specify the connection string for your mongodb database | |
| // and the location to your Parse cloud code | |
| var api = new ParseServer({ | |
| databaseURI: 'mongodb://localhost:27017/myapp', | |
| appId: '{YOUR_APP_ID}', |
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
| # Install required nodejs packages | |
| npm install parse-server express |
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
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Redirect; | |
| use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; | |
| class VerifyCsrfToken extends BaseVerifier | |
| { |
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
| <?xml version='1.0' encoding='utf-8'?> | |
| <manifest android:hardwareAccelerated="true" android:versionCode="4" android:versionName="1.0" package="com.webniraj.cordova" xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> | |
| <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
| <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:name="com.webniraj.cordova.App" android:supportsRtl="true"> | |
| <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize"> | |
| <intent-filter android:label="@string/launcher |
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
| <meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/push_icon" /> |
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
| if ( device.platform == 'iOS' && parseFloat( device.version ) >= 9 ) { | |
| // fix for iOS 9 only or it will break Android | |
| $.mobile.hashListeningEnabled = true; | |
| $.mobile.pushStateEnabled = false; | |
| } |
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
| <?php | |
| $string = "I'm using PHP to encrypt and decrypt data!"; | |
| $publicKey = file_get_contents( 'public.pub' ); | |
| openssl_public_encrypt( $string, $encrypted, $publicKey ); | |
| $encrypted = base64_encode( $encrypted ); |
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
| <?php | |
| $config = array( | |
| "digest_alg" => "sha512", | |
| "private_key_bits" => 4096, | |
| "private_key_type" => OPENSSL_KEYTYPE_RSA, | |
| ); | |
| // Create the private and public key | |
| $result = openssl_pkey_new( $config ); |