Skip to content

Instantly share code, notes, and snippets.

View xahy's full-sized avatar
:shipit:

Ismail Zahee xahy

:shipit:
View GitHub Profile
'ހއ. ތުރާކުނު',
'ހއ. އުލިގަން',
'ހއ. މޮޅަދޫ',
'ހއ. ހޯރަފުށި',
'ހއ. އިހަވަންދޫ',
'ހއ. ކެލާ',
'ހއ. ވަށަފަރު',
'ހއ. ދިއްދޫ',
'ހއ. ފިއްލަދޫ',
'ހއ. މާރަންދޫ',
@xahy
xahy / countries.php
Created August 14, 2018 15:33 — forked from JeffreyWay/countries.php
Country Names + Codes
[
"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 April 1, 2018 11:14 — forked from lucnap/fb-page-access-token-no-expire
How to get a Facebook Page Access Token that doesn't expire Never!
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 December 26, 2016 04:00
A mixin to add media query related style attributes
@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; }
}
@xahy
xahy / aliases.sh
Last active August 5, 2018 08:53
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 October 24, 2016 04:26 — forked from phanan/runner.js
Record a webpage with PhantomJS and FFMpeg
// 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 September 8, 2015 05:28 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

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