Skip to content

Instantly share code, notes, and snippets.

View nixon1333's full-sized avatar
Moving Fast

Ashraful Islam Nixon nixon1333

Moving Fast
View GitHub Profile
@nixon1333
nixon1333 / docker-cleanup-resources.md
Created November 7, 2019 15:31 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

How to make a paypal transaction with IPN integrations using php

Note: This example for sandbox only.

For this simple process we will be needed these files.

  • payal_transaction.html to create the transaction
  • ipn_paypal.php to validate the ipn request by paypal.
  • PaypalIPN.php to get the PaypalIPN.php please visit here.
@nixon1333
nixon1333 / setup-vagrant-macosx.md
Created April 3, 2018 03:12 — forked from tomysmile/setup-vagrant-macosx.md
How to Install Virtualbox and Vagrant on MacOSX

Install Virtualbox && Vagrant for MacOSX

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox

Now install Vagrant either from the website or use homebrew for installing it.

@nixon1333
nixon1333 / async2Sync.js
Created February 2, 2018 16:31
Make async function to sync function without npm fiber
var restunResult = aNormalSyncFunc();
function aNormalSyncFunc() {
var deAsync = require('deasync');
var taskDoneCount = 0;
//task 1 is happening
tasks1(param, function(res1){
//do something with data
@nixon1333
nixon1333 / loader.html
Created December 26, 2017 13:25
load a long time consuming link with a loader
<html>
<head>
<style>
#loading {
display:none;
position:absolute;
left:0;
top:0;
@nixon1333
nixon1333 / corp-000.properties
Created December 6, 2017 06:10
Symmetric DS config for client and store
#
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#
# You should have received a copy of the GNU General Public License,
@nixon1333
nixon1333 / symfony2_query_builder.php
Last active February 3, 2018 18:00
symfomy2 custom query builder
<?php
$repository = $this->getDoctrine()->getManager()->getRepository('ApplicationBundle:AccWorkloadEntry');
$query = $repository->createQueryBuilder('c')->where("c.companyId = ".$this->CompanyID);
$query->andWhere("c.status ='1'");
$query->andWhere("c.reportDate between '".$dateFrom ."' and '".$dateTo."'");
@nixon1333
nixon1333 / pushit.sh
Created September 7, 2017 05:06
git command to add, commit, push all together
function gitall(){
git add -A && git commit -am "$*" && git push
}
alias pushit="gitall"
.signup-modal-mod {
display: none;
width: 36.6rem;
padding: 1.1rem;
max-width: 90%;
z-index: 100;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
#!/bin/bash
#date: 20/02/2017
#this script will install basic server package,php,composer,mysql,webserver etc
#this script has code for install both php 5 and 7 but default is 5
#this script has code for install both nginx and apache2 but default is apache2
#check if script run by Mr.Root :P
set -eu
if [ "$(id -u)" != "0" ]; then