Skip to content

Instantly share code, notes, and snippets.

View timilsinabishal's full-sized avatar

Bishal Timilsina timilsinabishal

View GitHub Profile
#!/bin/sh
#start contactsid_auth
#move to base folder
cd $(dirname $0)
cd ..
(cd contactsid_auth && docker-compose up -d)
(cd hpc_service && docker-compose up -d)
(cd hpc_app && docker-compose up -d)
(cd un-fts-public && docker-compose up -d)
@timilsinabishal
timilsinabishal / startup.sh
Last active January 22, 2017 14:46
Script to automate some task when the computer boots
#!/bin/bash
set result =""
function checkAp {
nmcli -f BSSID,ACTIVE,SSID dev wifi list | awk '$3 ~ /YIPL-*/ && $2 ~ /yes/ {print $2}'
return
}
function runScripts(){
for i in $(find $1 -type f)
do
@timilsinabishal
timilsinabishal / docker-cleanup.sh
Created January 22, 2017 14:43
Script to reclaim the disk by removing unused docker data
#!bin/bash
#clean containers
docker rm $(docker ps -a -f status=exited -q)
#clean dangling images
docker rmi $(docker images -f dangling=true -q)
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, path.join(__dirname, 'public', 'upload'));
},
fileName: function (req, file, cb) {
cb(null, file.fieldName+'-'+Date.now());
}
});
FROM php:7-fpm-alpine
Maintainer Bishal Timilsina<bishaltimilsina@gmail.com>
RUN apk add openssl --update-cache
RUN apk add postgresql-dev freetype-dev libpng-dev libjpeg-turbo-dev freetype libpng libjpeg-turbo \
&& docker-php-ext-configure gd \
--with-gd \
--with-freetype-dir=/usr/include/ \
address decisionDate deadlineDate mentions description  organizationName
1/17 02.01.2017 02.01.2020 Persoana juridica 1007600056023 S.C. SANEX-COMERŢ S.R.L.
8/16 06.12.2016 06.12.2019 Persoana juridica 1008600058655 LIMTEX-PRIM S.R.L.
5119 01.09.2016 01.09.2019 Persoana juridica 1003602026613 S.C. MULTIVERS S.R.L.
2/16 02.02.2016 02.02.2019 Persoana juridica 1014600005087 PLANIFICARE S.R.L.
18/15 21.12.2015 21.12.2018 Persoana juridica 1003600033206 DIVABONA S.R.L.
16/15 30.11.2015 30.11.2018 Persoana juridica 1003600057310 ARTPREST GRUP S.R.L.
8/15 17.04.2015 16.04.2018 Persoana juridica 1005609004779 S.C. ILMAVA S.R.L.
7/15 30.03.2015 31.03.2018 Persoana juridica 1010600039541 VITASDANCOM S.R.L.
728/14 24.11.2014 24.11.2017 Persoana juridica 1003605001341 S.R.L. LEOZAP-LUX
@timilsinabishal
timilsinabishal / .gitlab-ci.yml
Created June 28, 2017 08:23
Gitlab CI file for continous deployment using capistrano
image: ruby:latest
before_script:
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
- ssh-add <(echo -e "$SSH_PRIVATE_KEY")
- gem install capistrano
stages:
- deploy
@timilsinabishal
timilsinabishal / InfiniteScroll.js
Created October 26, 2018 09:45
Infinite scrolling component for react
import React from 'react';
import PropTypes from 'prop-types';
import { throttle } from 'lodash';
const propTypes = {
loading: PropTypes.bool,
loadingComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.element]),
disableRefresh: PropTypes.bool,
children: PropTypes.oneOfType([PropTypes.node, PropTypes.element]).isRequired,
onEndReached: PropTypes.func.isRequired,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Backup
docker exec container /usr/bin/mysqldump -u user -ppassword database > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql