Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Hasnain Bukhari BukhariH

🎯
Focusing
Block or report user

Report or block BukhariH

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BukhariH
BukhariH / 4.3.1 Photosynthesis Pigments.md
Last active Aug 29, 2015
4.3.1 Photosynthesis Pigment
View 4.3.1 Photosynthesis Pigments.md
  • f) define the term photosynthetic pigment;

    • Photosynthetic pigments are molecules that absorb light energy.
    • Each pigment absorbs a specific wavelength of light in the visible light region
    • Each pigment also has specific peak of absorption
    • Wavelengths outside the range a reflected
    • This reflected light is the colour which they appear to us as
  • g) explain the importance of photosynthetic pigments in photosynthesis;

    • Photosynthetic Pigments are held in place by proteins in the thylakoid membranes
    • They are arranged in a funnel shape structure called a photosystem
View fetcher.rb
require 'json'
require 'net/http'
require 'uri'
require 'rbconfig'
require 'io/console'
puts "Enter Username:"
@username = gets.chomp
puts "Enter Password (input will be hidden):"
@password = STDIN.noecho(&:gets).chomp
View Added Linux
require 'json'
require 'net/http'
require 'uri'
require 'rbconfig'
require 'io/console'
puts "Enter Username:"
@username = gets.chomp
puts "Enter Password (input will be hidden):"
@password = STDIN.noecho(&:gets).chomp
View gist:55a286ea28b36361e1db
alias desktop='cd /Users/Hasnain/Desktop'
alias fs='foreman start'
alias fsdev='foreman start -f Procfile-dev'
alias bu='bundle update'
alias rs='rails s'
alias be='bundle exec'
alias gems='cd /Users/Hasnain/dev/gem'
alias web='cd /Users/Hasnain/dev/web'
alias tmp='cd /Users/Hasnain/dev/tmp'
alias nit='cd /Users/Hasnain/Nitrous'
@BukhariH
BukhariH / iterm2-solarized.md
Created Jun 5, 2016 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
View gist:91990873c6b382ee09cb7849694a2d79
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
View gist:a6de426c6cd29db93ab582813442fb55
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@BukhariH
BukhariH / reduceArrayToObj.js
Last active Jul 12, 2017
Turn an Array of Objects into an Object using Reduce
View reduceArrayToObj.js
// change array & property to relevant values
const reducedObj = array.reduce(function(accum, item) {
accum[item.property] = item;
return accum;
}, {})
@BukhariH
BukhariH / uniqueProperties.js
Last active Sep 6, 2017
Get unique properties from JSON object
View uniqueProperties.js
// Turn const ARRAY = [{type: "FOO", content: "Test 0"}, {type: "BAR", content: "Test 1"}, {type: "FOO", content: "Test 2"}]
// Into ["FOO", "BAR"]
// Using getUniqueProperties(ARRAY, 'type')
getUniqueProperties = (array, property)=>{
return [...new Set(array.map(elem => elem[property]))]
}
View Merge Last Two Commits.sh
git reset --soft "HEAD^"
git commit --amend
You can’t perform that action at this time.