Skip to content

Instantly share code, notes, and snippets.

@weshouman
weshouman / Ruby On Rails insights.md
Created June 27, 2016 11:12
Ruby on Rails study stuff
@weshouman
weshouman / bower managed frontend packages in rails.md
Last active August 6, 2016 14:25
Front end development notes

Install Bower

Install bower on the system (required by bower-rails gem)

npm install -g bower

Add Bower to the Gemfile

gem 'bower-rails'
@weshouman
weshouman / Debugging States.md
Last active August 14, 2016 20:56
angular notes

Transition messages

Following code displays log messages that get fired when state transitions happen,
watch for the error messages, in case any exists, if 404 is found for a requested object
check the templateURL naming the state shows in the developer tools console

Add the following to the html were angular is activated ie: anywhere into index.html.erb given that application.html.erb has angular activated

<script>

testing using telnet and openssl

HTTP

open the connection

telnet www.google.com 80

make the request

GET /#q=walid HTTP/1.1
@weshouman
weshouman / RESTful Facebook graph calls with curl.md
Last active September 15, 2016 05:37
Curl into the graph api

Acquiring an Access Token

First we need an access token with some permissions sufficient for the calls we are gonna make.
Let's just use the basic permissions about us.
To acquire an access token use this tool

GET reqeust

Following command should return {"name":user_name,"id":user_id}

curl -X GET "https://graph.facebook.com/me?access_token=ACCESS_TOKEN"
@weshouman
weshouman / fb_login_call.md
Created September 15, 2016 12:36
facebook login experience

Some notes about the provided example in Facebook Javascript SDK in the login documentation

FB.login(function(response) {
    // Here the authResponse is available for us to be used.
    // inside it we can debug the access token, it's expiration, granted permissions etc. : in example
    // reference for the FB.login fromat: https://developers.facebook.com/docs/facebook-login/web
    console.log('Granted scopes are: ' + response.authResponse.grantedScopes);
    console.log('Access token is' + response.authResponse.accessToken);
    if (response.authResponse) {
@weshouman
weshouman / git_commit_techniques.md
Last active September 22, 2016 17:56
Git techniques

Setup

Alias git commit to git ci
Alias git status to git st
Alias git diff --cached to git dc

git config --global alias.ci commit
git config --global alias.st status
git config --global alias.dc "diff --cached"
@weshouman
weshouman / ruby.md
Last active September 30, 2016 21:56
documenting the html list to redis app
@weshouman
weshouman / Software study wishlist.md
Created October 2, 2016 08:11
software with interesting contents, structures or technologies

This list contains projects that I wish to discover, software reading.
In each software I'll add a couple of questions that answering them shall give more insights about how this software is created.
Wasabi may be useful for documenting those software structure.

Xournal

Project page

  • Language
  • UI Toolkit (cross platform)
  • Tablet XInput [How random lines are stored]
@weshouman
weshouman / setup steps and hints.md
Last active October 4, 2016 16:10
Social login notes

Various links that are associated with the social login for different providers, ie: Facebook and Google

Facebook

Mote: Facebook authentication is based on the access_token that gets changed from time to time.
keeping the access_token secured and using only the token provided the application itself is the application's task.