mirror of
https://github.com/softinio/softinio.com.git
synced 2025-08-31 17:26:42 -07:00
Initial migration to new theme
This commit is contained in:
parent
5ce643146c
commit
83e5d66863
27 changed files with 224 additions and 511 deletions
3
content/_index.md
Normal file
3
content/_index.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
+++
|
||||
author = "Salar Rahmanian"
|
||||
+++
|
6
content/post/_index.md
Normal file
6
content/post/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Posts"
|
||||
author = "Salar Rahmanian"
|
||||
tags = ["index"]
|
||||
+++
|
|
@ -1,14 +1,15 @@
|
|||
+++
|
||||
title = "Life changes and announcing SFBayAreaTech"
|
||||
date = 2018-08-10T07:29:10-07:00
|
||||
description = "Me and family moved, I changed jobs and announcing SFBayAreaTech a slack community for anyone working in tech who are based in the San Francisco Bay Area California"
|
||||
draft = false
|
||||
keywords = ["sfbayareatech", "slack", "community", "san francisco", "bay area", "california"]
|
||||
description = "Me and family moved, I changed jobs and announcing SFBayAreaTech a slack community for anyone working in tech who are based in the San Francisco Bay Area California"
|
||||
tags = ["general", "sfbayareatech"]
|
||||
tags = ["sfbayareatechies"]
|
||||
categories = ["general"]
|
||||
lastmod = 2018-08-10T07:29:10-07:00
|
||||
+++
|
||||
|
||||
#### Update: Since writing this blog, I have changed jobs and SFBayAreaTech has changed to <https://www.sfbayareatechies.com> ####
|
||||
|
||||
2018 has been a fabulous year so far. Me and [family moved to the San Francisco bay area](https://www.rahmanian.xyz/post/goodbye-virginia-and-hello-san-fransisco-bay-area/) realizing my life long dream and our family goals.
|
||||
|
||||
It is absolutely an awesome experience living in the Bay Area amongst so many super smart techies and great startups. On arrival I had two initial goals, namely, meet everyone in tech and make friends and find a new awesome job with a startup that has a great future and potential solving problems that line up well with my interests and technical interests.
|
||||
|
|
|
@ -1,263 +0,0 @@
|
|||
+++
|
||||
Topics = ["development"]
|
||||
date = "2014-01-09T08:54:57-05:00"
|
||||
Description = "Overview of what is involved in getting your Laravel 4 apps authentication system to integrate with Get Satisfaction Fastpass for single sign on."
|
||||
Keywords = ["laravel", "php", "fastpass"]
|
||||
Tags = ["laravel", "php", "fastpass"]
|
||||
Slug = "integrating-get-satisfaction-fastpass-with-laravel"
|
||||
Title = "Integrating Get Satisfaction Fastpass with Laravel"
|
||||
+++
|
||||
|
||||
Here is an overview of what is involved in getting your Laravel 4 apps authentication system to integrate with Get Satisfaction Fastpass for single sign on.
|
||||
|
||||
## What I am using
|
||||
* [Laravel 4.0][2]
|
||||
* [Cartalyst Sentry 2][3] (for authentication)
|
||||
* [Former][4]
|
||||
* [Fastpass PHP SDK][1]
|
||||
|
||||
## Install the Fastpass PHP SDK
|
||||
|
||||
**Create a folder to install the library in**
|
||||
```
|
||||
$ mkdir app/lib
|
||||
$ mkdir app/lib/getsatisfaction
|
||||
```
|
||||
**Download & untar/unzip the Fastpass PHP SDK**
|
||||
```
|
||||
cd app/lib/getsatisfaction
|
||||
wget "https://getsatisfaction.com/fastpass/php.tar.gz"
|
||||
tar -zxvf php.tar.gz .
|
||||
```
|
||||
|
||||
**Update** *composer.json* **adding the location of the library**
|
||||
|
||||
In the *autoload* section add the path *app/lib/getsatisfaction*
|
||||
|
||||
```json
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"app/commands",
|
||||
"app/controllers",
|
||||
"app/models",
|
||||
"app/database/migrations",
|
||||
"app/database/seeds",
|
||||
"app/tests/TestCase.php",
|
||||
"app/lib/getsatisfaction"
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
**In the console run**
|
||||
```
|
||||
$ composer update
|
||||
$ php artisan dump-autoload
|
||||
```
|
||||
|
||||
**Create a configuration file (e.g. app/config/getsatisfaction.php ) to hold your API tokens for the Fastpass service**
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'key' => '<your fastpass key>',
|
||||
'secret' => '<your fastpass secret>',
|
||||
'domain' => '<your domain for your get satisfaction commmunity>',
|
||||
);
|
||||
```
|
||||
|
||||
The above information can be found in the admin section once you log in as administrator on <http://getsatisfaction.com>.
|
||||
|
||||
## Create a login screen for Single Sign on
|
||||
|
||||
We now need to create a login form to be used by the Fastpass service to use our authentication service provided by sentry to log users into Get Satisfaction.
|
||||
|
||||
**First we create a new controller** *app/controllers/SatisfactionController.php*
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
use App\Services\Validators\UserValidator;
|
||||
use Cartalyst\Sentry\Users;
|
||||
|
||||
class SatisfactionController extends BaseController
|
||||
{
|
||||
/**
|
||||
* Authenticate the user
|
||||
*
|
||||
* @author Salar Rahmanian
|
||||
* @link http://www.softinio.com
|
||||
*
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function postLogin()
|
||||
{
|
||||
$remember = Input::get('remember_me', false);
|
||||
$userdata = array(
|
||||
Config::get('cartalyst/sentry::users.login_attribute') => Input::get('login_attribute'),
|
||||
'password' => Input::get('password')
|
||||
);
|
||||
try {
|
||||
// Log user in
|
||||
$user = Sentry::authenticate($userdata, $remember);
|
||||
} catch (LoginRequiredException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (PasswordRequiredException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (WrongPasswordException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (UserNotActivatedException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (UserNotFoundException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (UserSuspendedException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (UserBannedException $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
return Redirect::back()->withInput()->with('error', $e->getMessage());
|
||||
}
|
||||
|
||||
Event::fire('users.login', array($user));
|
||||
|
||||
// Log user into Get Satisfaction service
|
||||
return View::make('satisfaction.index', compact('user'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the login form
|
||||
*
|
||||
* @author Salar Rahmanian
|
||||
* @link http://www.softinio.com
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getLogin()
|
||||
{
|
||||
// Check to see if user logged in, if not show login form
|
||||
if (!\Sentry::check()) {
|
||||
$login_attribute = Config::get('cartalyst/sentry::users.login_attribute');
|
||||
return View::make('satisfaction.login', compact('login_attribute'));
|
||||
}
|
||||
|
||||
// user already logged in so log them into Get Satisfaction service
|
||||
$user = \Sentry::getUser();
|
||||
|
||||
return View::make('satisfaction.index', compact('user'));
|
||||
}
|
||||
}
|
||||
```
|
||||
Now we need to create the two views used by this controller, one with a login form and one view which logs the user into the get satisfaction service.
|
||||
|
||||
For the login form we create the view *app/views/satisfaction/login.blade.php*
|
||||
|
||||
This can be a copy of the login form you currently use within your Laravel app but with the form action changed to use the new *SatisfactionController*.
|
||||
|
||||
```
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('h1')
|
||||
<h1>Sign In</h1>
|
||||
@stop
|
||||
|
||||
@section('crumb')
|
||||
<li><a href="{{ url('/satisfaction/index') }}">User</a></li>
|
||||
<li class="active">Login</li>
|
||||
@stop
|
||||
|
||||
@section('title')
|
||||
Sign In -
|
||||
@stop
|
||||
|
||||
@section('container')
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-2 col-lg-6 col-md-offset-2 col-md-6">
|
||||
{{ Former::horizontal_open(url('/satisfaction/login')) }}
|
||||
|
||||
{{ Former::text('login_attribute', 'User Name',Input::old('login_attribute'))->required() }}
|
||||
|
||||
{{ Former::password('password', 'Password')->required() }}
|
||||
{{ Former::checkbox('remember_me',' ')->text('Remember me on this computer') }}
|
||||
|
||||
|
||||
<div class="col-lg-offset-3 col-sm-offset-4 col-lg-9 col-sm-8">
|
||||
{{ Former::primary_submit('Log in') }}
|
||||
<a href="{{ URL::route('user.register') }}" class="pull-right">Register Here</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
```
|
||||
|
||||
**We create the view that logs user into Get Satisfaction** *app/views/satisfaction/index.blade.php*
|
||||
|
||||
This is in effect a blank html document which calls the php class from the Fastpass library to log the current user into the Get Satisfaction service.
|
||||
|
||||
```
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
{{ \FastPass::$domain = \Config::get('getsatisfaction.domain'); }}
|
||||
{{ \FastPass::script(\Config::get('getsatisfaction.key'),
|
||||
\Config::get('getsatisfaction.secret'),
|
||||
$user->email,
|
||||
$user->username,
|
||||
$user->id,
|
||||
true
|
||||
); }}
|
||||
|
||||
<html lang="en" class="env_<?php echo App::environment(); ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="/assets/ico/favicon.png">
|
||||
|
||||
<title>@yield('title') softinio.com </title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
{{ basset_stylesheets('bootstrap','application') }}
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
{{ basset_javascripts('html5') }}
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
The users email , username and user id provided by Sentry are used to create and log user into the Get Satisfaction service. The username is what will be displayed as the logged in user on Get Satisfaction website so if you prefer something else you can substitute username for what you prefer.
|
||||
|
||||
**Update your** *app/routes.php* **file**
|
||||
|
||||
```php
|
||||
Route::get('satisfaction/login', 'SatisfactionController@getLogin');
|
||||
Route::post('satisfaction/login','SatisfactionController@postLogin');
|
||||
```
|
||||
|
||||
## Update Get Satisfaction with your login URL
|
||||
|
||||
Based on the new route you created for the *SatisfactionController* your URL to your single sign on should be
|
||||
```
|
||||
http://<yourdomain where your laravel app is>/satisfaction/login
|
||||
```
|
||||
|
||||
Log into Get Satifaction as admin, click the wheel settings menu, select Configure then select Fastpass. Here set your *External Login URL* to this and click save.
|
||||
|
||||
Whilst you are logged in as admin you can also click login options and select Fastpass as your preferred login method.
|
||||
|
||||
|
||||
[1]: https://getsatisfaction.com/fastpass/php.tar.gz
|
||||
[2]: http://laravel.com
|
||||
[3]: https://cartalyst.com/manual/sentry
|
||||
[4]: http://anahkiasen.github.io/former
|
|
@ -1,11 +1,11 @@
|
|||
+++
|
||||
Topics = ["development"]
|
||||
title = "Migrating from Pelican to Hugo"
|
||||
date = "2015-11-29T07:16:53-05:00"
|
||||
Description = "In this post I will discuss the steps I took to migrate my blog from Pelican to Hugo."
|
||||
Keywords = ["pelican", "hugo", "golang", "go", "python", "blog"]
|
||||
Slug = "migrating-from-pelican-to-hugo"
|
||||
Tags = ["pelican", "hugo", "golang", "go", "python", "blog"]
|
||||
Title = "Migrating from Pelican to Hugo"
|
||||
description = "In this post I will discuss the steps I took to migrate my blog from Pelican to Hugo."
|
||||
toc = true
|
||||
keywords = ["pelican", "hugo", "golang", "go", "python", "blog"]
|
||||
tags = ["hugo", "golang", "blog"]
|
||||
categories = ["development"]
|
||||
+++
|
||||
|
||||
In this post I will discuss the steps I took to migrate my blog from [Pelican](http://blog.getpelican.com/) to [Hugo](http://gohugo.io/).
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
+++
|
||||
title = "Moving from Homebrew to Nix Package Manager"
|
||||
date = 2019-02-16T18:30:40-07:00
|
||||
draft = false
|
||||
keywords = ["nix", "nixos", "macos", "macbook", "package manager", "functional programming"]
|
||||
description = "Moving from Homebrew to Nix Package manager on my macbook pro"
|
||||
featured = true
|
||||
draft = false
|
||||
toc = true
|
||||
keywords = ["nix", "nixos", "macos", "macbook", "package manager", "functional programming"]
|
||||
tags = ["nix", "nixos", "macos", "functional programming"]
|
||||
categories = ["nix", "nixos", "macos", "macbook"]
|
||||
lastmod = 2019-02-16T18:30:40-07:00
|
||||
categories = ["nix", "nixos", "macos"]
|
||||
+++
|
||||
|
||||

|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
+++
|
||||
title = "PyBay 2018 San Francisco"
|
||||
date = 2018-10-25T18:30:40-07:00
|
||||
description = "Highlights of PyBay 2018 conference a Python event based in the San Francisco Bay Area California"
|
||||
draft = false
|
||||
keywords = ["python", "pybay", "sfpython", "pycon", "san francisco", "bay area", "california", "conference"]
|
||||
description = "Highlights of PyBay 2018 conference a Python event based in the San Francisco Bay Area California"
|
||||
tags = ["python", "conference"]
|
||||
categories = ["python", "conference"]
|
||||
lastmod = 2018-10-25T18:30:40-07:00
|
||||
+++
|
||||
As you read in my [last blog](https://www.softinio.com/post/life-changes-and-announcing-sfbayareatech/)
|
||||
I was lucky enough to finally move to the bay area. If you know me you will
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
+++
|
||||
title = "Scale By The Bay 2018 San Francisco"
|
||||
date = 2019-05-02T18:30:40-07:00
|
||||
description = "Highlights of Scale By The Bay 2018 San Francisco conference an event based in the San Francisco Bay Area California with major focus on Functional Programming, Reactive programming and Data Science"
|
||||
draft = false
|
||||
keywords = ["scala", "bythebay", "sfscala", "functional programming", "san francisco", "bay area", "california", "conference"]
|
||||
description = "Highlights of Scale By The Bay 2018 San Francisco conference an event based in the San Francisco Bay Area California with major focus on Functional Programming, Reactive programming and Data Science"
|
||||
tags = ["scala", "conference", "functional programming"]
|
||||
categories = ["scala", "conference", "functional programming"]
|
||||
lastmod = 2019-05-02T18:30:40-07:00
|
||||
+++
|
||||
|
||||
One of the highlights of 2018 was attending and being part of the Scale By the bay 2018 conference in San Francisco. This by far was the best conference I have ever attended.
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
+++
|
||||
Topics = ["development"]
|
||||
title = "Using pyenv for Python projects"
|
||||
date = "2015-04-13T09:06:03-05:00"
|
||||
Description = "Using pyenv to manage your virtual environments makes working on multiple projects, each using a different version of python a breeze."
|
||||
Slug = "using-pyenv-for-python-projects"
|
||||
Tags = ["python", "pyenv", "centos"]
|
||||
Keywords = ["python", "pyenv", "centos"]
|
||||
Title = "Using pyenv for Python projects"
|
||||
draft = false
|
||||
toc = true
|
||||
description = "Using pyenv to manage your virtual environments makes working on multiple projects, each using a different version of python a breeze."
|
||||
keywords = ["python", "pyenv", "centos", "macos"]
|
||||
tags = ["python", "pyenv", "centos", "macos"]
|
||||
categories = ["development"]
|
||||
+++
|
||||
|
||||
Using [pyenv][3] to manage your virtual environments makes working on multiple projects, each using a different version of python a breeze.
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
+++
|
||||
date = "2018-04-16T09:16:07-05:00"
|
||||
lastmod = "2020-07-27"
|
||||
Description = "Salar Rahmanian Resume"
|
||||
keywords = ["Salar", "Rahmanian", "Salar Rahmanian", "Resume", "CV"]
|
||||
menu = "main"
|
||||
slug = "salar-rahmanian-resume"
|
||||
title = "Resume"
|
||||
date = "2018-04-16T09:16:07-05:00"
|
||||
description = "Salar Rahmanian Resume"
|
||||
keywords = ["Salar", "Rahmanian", "Salar Rahmanian", "Resume", "CV"]
|
||||
+++
|
||||
# Salar Rahmanian #
|
||||
## My Location ##
|
|
@ -1,10 +1,8 @@
|
|||
+++
|
||||
title = "Salar Rahmanian"
|
||||
date = "2015-11-26T09:16:07-05:00"
|
||||
Description = "About Salar Rahmanian"
|
||||
description = "About Salar Rahmanian"
|
||||
keywords = ["Salar", "Rahmanian", "Salar Rahmanian"]
|
||||
menu = "main"
|
||||
slug = "salar-rahmanian"
|
||||
title = "About Me"
|
||||
+++
|
||||
|
||||
I , [Salar Rahmanian](https://www.softinio.com), am a software developer based in San Francisco Bay area, California.
|
Loading…
Add table
Add a link
Reference in a new issue