Skip to content

Instantly share code, notes, and snippets.

View gunnrryy's full-sized avatar
🏠
Working from home

Yash Khuthia gunnrryy

🏠
Working from home
  • Acquia
  • Mumbai, India
View GitHub Profile
@gunnrryy
gunnrryy / Mysql-README.md
Last active February 27, 2018 10:32 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
public function actionLogin() {
$linkedinBase = new LinkedinBase();
$linkedIn = $linkedinBase->linkedInObj;
try {
$authenticated = $linkedinBase->isAuthenticated();
if ($authenticated) {
$attr = $this->formatAttributes($authenticated);
if (!empty($attr['profile']['emailAddress']) && !empty($attr['profile']['name'])) {
$user = new Users();
@gunnrryy
gunnrryy / Facebook class
Last active October 5, 2016 12:13
FB post
Class FacebookController ()
{
public function actionPost() {
$req = Yii::$app->controller->action->id;
$message = Yii::$app->request->post('message');
// store the message in $_SESSION
$this->authenticate($req);
}
private function authenticate($req) {
@gunnrryy
gunnrryy / GooglePostClient
Created September 27, 2016 13:12
Google Auto Post
// Note :: only use the below mentioned scope. Do not add Plus.login scope,as it conflicts with the permission
<?php
namespace common\components\google;
define('APPLICATION_NAME', '{Your Application Name}');
define('CREDENTIALS_PATH', '~/.credentials/people.googleapis.com-php-quickstart.json');
define('CLIENT_SECRET_PATH', __DIR__ . '/client_secret_2.json'); // credential.json