Skip to content

Instantly share code, notes, and snippets.

Avatar
😷
Working from home

Ismail Zahee xahy

😷
Working from home
View GitHub Profile
View Island Names and Constituents
'ހއ. ތުރާކުނު',
'ހއ. އުލިގަން',
'ހއ. މޮޅަދޫ',
'ހއ. ހޯރަފުށި',
'ހއ. އިހަވަންދޫ',
'ހއ. ކެލާ',
'ހއ. ވަށަފަރު',
'ހއ. ދިއްދޫ',
'ހއ. ފިއްލަދޫ',
'ހއ. މާރަންދޫ',
@xahy
xahy / countries.php
Created Aug 14, 2018 — forked from JeffreyWay/countries.php
Country Names + Codes
View countries.php
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
@xahy
xahy / fb-page-access-token-no-expire
Created Apr 1, 2018 — forked from lucnap/fb-page-access-token-no-expire
How to get a Facebook Page Access Token that doesn't expire Never!
View fb-page-access-token-no-expire
How to get a Facebook Page Access Token that doesn't expire Never!
- Go to http://developers.facebook.com/tools/explorer/
- Get a User Access Token with a permission "manage_pages"
- Convert this short-lived access token into a long-lived one by making this Graph API call:
https://graph.facebook.com/v2.6/oauth/access_token?client_id=<your FB App ID >&client_secret=<your FB App secret>&grant_type=fb_exchange_token&fb_exchange_token=<your short-lived access token>
- Make a call Graph API:
https://graph.facebook.com/v2.6/<your personal account FB user id>/accounts?access_token=<your long-lived access token>
- The returned access_token has no expiration unless you change your password or not more admin of the target page or deauthorize FB page
@xahy
xahy / media_query.scss
Created Dec 26, 2016
A mixin to add media query related style attributes
View media_query.scss
@mixin breakpoint($point) {
@if $point == large {
@media (min-width: 1250px) { @content; }
}
@else if $point == medium {
@media (min-width: 650px) { @content; }
}
@else if $point == small {
@media (max-width: 650px) { @content; }
}
View aliases.sh
alias gs="git status"
alias gl="git log"
alias gaa="git add ."
alias gc="git commit -m "
alias gcad="git commit -m 'update ad [deploy: production]'"
alias gp="git push"
alias nah="git reset --hard && git clean -df"
alias sites="cd ~/Sites"
alias art="php artisan "
alias fresh="php artisan migrate:fresh --seed"
@xahy
xahy / runner.js
Created Oct 24, 2016 — forked from phanan/runner.js
Record a webpage with PhantomJS and FFMpeg
View runner.js
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
@xahy
xahy / Contract Killer 3.md
Last active Sep 8, 2015 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post