Skip to content

Instantly share code, notes, and snippets.

View loai-kanou's full-sized avatar
🎯
Focusing

Loai Kanou loai-kanou

🎯
Focusing
View GitHub Profile
@loai-kanou
loai-kanou / node-and-npm-in-30-seconds.sh
Created February 13, 2018 09:13 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@loai-kanou
loai-kanou / countries.sql
Created November 3, 2017 09:54 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@loai-kanou
loai-kanou / countries.sql
Created November 3, 2017 09:54 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@loai-kanou
loai-kanou / gist:84907a058644b158b323a17dedc170d9
Created November 1, 2017 21:41 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:51 — forked from LeaVerou/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, gold);
min-height: 100%;
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:51 — forked from LeaVerou/dabblet.css
Teardrop kitty - By @LeaVerou
/* Teardrop kitty - By @LeaVerou */
.teardrop {
display: inline-block;
overflow: hidden;
border-radius: 50%;
border-top-left-radius: 0;
transform: translateY(10%) scale(.8) rotate(45deg);
}
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:51 — forked from LeaVerou/dabblet.css
Inner border-radius example
/**
* Inner border-radius example
*/
body, div { border: 1px solid; }
body { width: 100px; border-radius: 20px; }
div { margin: 10px; padding: 10px; }
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:50 — forked from LeaVerou/dabblet.css
Pounding heart animation
/* Pounding heart animation */
@keyframes pound {
to { transform: scale(1.4); }
}
.heart {
display: inline-block;
font-size: 150px;
color: #e00;
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:50 — forked from LeaVerou/dabblet.css
Hashes in containers
/**
* Hashes in containers
*/
div {
width: 300px;
height: 300px;
overflow: auto;
border: 1px solid gray;
margin: 20px auto;
@loai-kanou
loai-kanou / dabblet.css
Created August 5, 2013 03:50 — forked from LeaVerou/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
html { background: gainsboro; }
body {
margin: 3em auto 0;
width: 6em;
height: 6em;