Skip to content

Instantly share code, notes, and snippets.

View merin83's full-sized avatar
☀️
Creating New Things

Md. Estiak Ahmmed (Merin) merin83

☀️
Creating New Things
View GitHub Profile
@merin83
merin83 / 0_reuse_code.js
Created January 18, 2017 13:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var all = [];
var main = [];
jQuery('.glyph div').each(function(index, div) {
var name = jQuery('div.pbs').find('.mls');
var className = jQuery(name).text();
all.push(className);
});
main = all[0].split(" ");
main.forEach((item) => {
if(item.length) {
<?php
$filename = 'snippets.json';
$f = file_get_contents( $filename );
$data = json_decode( $f, true );
echo "<pre>";
convertJSONtoArray( $data, 0 );
echo "</pre>";
function convertJSONtoArray( $data, $level ) // level - уровень вложенности чтобы табуляцию писать правильную
{
foreach( $data as $key1 => $value1 )
["0"] => array (
["name"] => "american-sign-language-interpreting",
["className"] => "fa fa-american-sign-language-interpreting",
),
["1"] => array (
["name"] => "asl-interpreting (alias)",
["className"] => "fa fa-asl-interpreting",
),
["2"] => array (
["name"] => "assistive-listening-systems",
Array
(
[0] => Array
(
[name] => american-sign-language-interpreting
[className] => fa fa-american-sign-language-interpreting
)
[1] => Array
(
@merin83
merin83 / fa-awesome.js
Last active October 9, 2016 09:57
Font Awesome Icon name
var all = [];
jQuery('#icons section').each(function(index, section) {
var id = jQuery(this).attr('id');
jQuery('#'+ id + ' a').each(function(index, iconrow) {
//console.log(jQuery(iconrow).text().replace('Example of ',''));
var text = jQuery(iconrow).text().replace('Example of','');
all.push(text .replace(/^\s+/g, ""));
console.log("array(\'name\' => \'"+ name +"\', \'className\' => \'"+iconElement.className+"\'),");
});
});
@merin83
merin83 / Dockerfile
Created August 8, 2016 04:24 — forked from tarex/Dockerfile
Node.js Dockerfile based on ubuntu 14.04. This is a little smaller than dockerfile/nodejs which depends on python
# Node.js app Docker file
FROM ubuntu:14.04
MAINTAINER Thom Nichols "thom@thomnichols.org"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
@merin83
merin83 / docker-resources.md
Created August 5, 2016 08:08 — forked from rgaidot/docker-resources.md
Docker Resources All In One - A collection of docker online resources
@merin83
merin83 / Deploy your site with git.md
Created July 18, 2016 18:09 — forked from tarex/Deploy your site with git.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages