Skip to content

Instantly share code, notes, and snippets.

View syeduzairshah's full-sized avatar

Uzair Ahmed syeduzairshah

View GitHub Profile
@syeduzairshah
syeduzairshah / Angular Factory for Google SSO
Last active January 3, 2019 08:43
Inject this module in your application and you can use Google Factory for Google authentication, accessing access token and user profile
(function(){
angular.module('googleSsoApp', []).factory("Google",['$http', '$q', function ($http, $q) {
var currentWindowUrl = location.protocol + '//' + location.host + location.pathname;
var accessType = 'offline';
var state = encodeURIComponent(currentWindowUrl);
var responseType = 'code';
var scope = 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
return{
authenticate: function(clientId, redirectUri){
@faniska
faniska / wkhtmltopdf.sh
Last active March 11, 2024 11:51
Install wkhtmltopdf with patched QT on Ubuntu Linux
# Uncomment the next line if you have installed wkhtmltopdf
# sudo apt remove wkhtmltopdf
cd ~
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox*.tar.xz
sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig