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 ); |
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
// include the libraries we need | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
// set some defaults | |
req = request.defaults({ | |
jar: true, // save cookies to jar | |
rejectUnauthorized: false, | |
followAllRedirects: true // allow redirections | |
}); |
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 request and cheerio. | |
# Use -g flag to install globally | |
npm install request cheerio |
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
// include the libraries we need | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
// set some defaults | |
req = request.defaults({ | |
jar: true, // save cookies to jar | |
rejectUnauthorized: false, | |
followAllRedirects: true // allow redirections | |
}); |
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 | |
try { | |
// Be sure to ask for the publish_actions permission first | |
// If you provided a 'default_access_token', third parameter '{access-token}' is optional. | |
$response = $fb->post( '/me/feed', [ | |
'name' => 'Facebook API: Using the Facebook PHP SDK v4.1.x', | |
'link' => 'https://www.webniraj.com/2015/02/19/facebook-api-using-the-facebook-php-sdk-v4-1-x/', | |
'caption' => 'As version v4.1 of the Facebook PHP SDK nears release (at time of writing), I though this would be a good time to explain how the new version works. Migrating your application from v4.0.x to v4.1.x will break your application.', | |
'message' => 'Check out my new blog post!', |