Skip to content

Instantly share code, notes, and snippets.

View ronisaha's full-sized avatar

Roni Saha ronisaha

View GitHub Profile
@ronisaha
ronisaha / Readme.md
Created April 4, 2023 00:43 — forked from carmelodevuz/Readme.md
Metronic Angular Skeleton (demos 1-8)

Basic skeleton preparation:

  1. Remove unnecessary modules in the folder src/app/modules. (!!!Except auth, i18n and errors folders).
  2. Comment unnecessary routes in the src/app/pages/routing.ts file. [9-45] rows.
  3. Clear Dashboard src/app/pages/dashboard.component.html file.
  4. Clear Dashboard module src/app/pages/dashboard.module.ts file (!remove WidgetsModule from the code, rows [5, 17].
  5. Remove Widgets src/_metronic/partials/content/widgets folder and the file src/app/_metronic/partials/index.ts file comment row [3].
  6. Clear Aside menu in the file src/app/_metronic/layout/components/aside/aside-menu/aside-menu.component.html. Keep only Dashboard menu item. (For demo1 also need to clear src/app/_metronic/layout/components/sidebar/sidebar-menu/sidebar-menu.component.html file)
  7. Clear Header menu in the file src/app/_metronic/layout/components/header/header-menu/header-menu.component.html. Keep only dashboard menu item.
  8. In case if you don't need Aut
#!/bin/bash
# based on https://github.com/victorcoder/dkron/issues/212
#dkron_url="http://localhost:8080"
dkron_url=$1
if [ -z "$dkron_url" ]; then
echo "Usage: $0 <dkron base url>"
exit 1
fi
curl -s -X GET "$dkron_url/v1/jobs" -H "accept: application/json" -o -
echo
@ronisaha
ronisaha / check_docker_container.sh
Created May 23, 2020 02:01 — forked from ekristen/check_docker_container.sh
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@ronisaha
ronisaha / window-controller.js
Created March 4, 2020 02:58
Inter tab messaging library
"use strict";
var WindowController = (function () {
function WindowController() {
this.id = Math.random();
this.callbacks = {};
window.addEventListener('storage', this, false);
window.addEventListener('unload', this, false);
}
WindowController.prototype.handleEvent = function (event) {
if (event.type === 'unload') {
@ronisaha
ronisaha / IdGenerator.php
Last active December 11, 2019 08:10
Snowflake IdGenerator implementation in php
<?php
/**
* Snowflake implementation in php
*
* @author Roni Saha <roni.cse@gmail.com>
*/
class IdGenerator
{
private static $_instance;
@ronisaha
ronisaha / FeatureContext.php
Created September 16, 2018 07:22 — forked from jakzal/FeatureContext.php
Generating schema before Behat scenarios in Symfony2
<?php
namespace Behat\CommonContext;
use Behat\BehatBundle\Context\BehatContext;
use Behat\Behat\Event\ScenarioEvent;
use Doctrine\ORM\Tools\SchemaTool;
/**
* Provides hooks for building and cleaning up a database schema with Doctrine.
@ronisaha
ronisaha / main.component.ts
Created April 24, 2018 04:06 — forked from soyuka/main.component.ts
RxRest in an angular / api-platform context using jsonld and hydra
import { NgModule, Component, OnInit } from '@angular/core'
import { AngularRxRest, AngularRxRestConfiguration } from './rxrest'
@Component({
selector: 'prefix-main',
template: '<prefix-foo></prefix-foo>'
})
export class MainComponent implements OnInit {
loading: boolean = false
loggedIn: boolean = false
@ronisaha
ronisaha / wordpress-plugin-svn-to-git.md
Created November 9, 2017 02:11 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@ronisaha
ronisaha / composer.json
Created October 28, 2017 08:08 — forked from jaytaph/composer.json
Using the Symfony security component as standalone
{
"name": "jaytaph/security-example",
"require": {
"symfony/security-core": "~2.8"
},
"authors": [
{
"name": "Joshua Thijssen",
"email": "jthijssen@noxlogic.nl"
}
@ronisaha
ronisaha / index.html
Created August 20, 2017 15:28 — forked from StickyCube/index.html
Electron click through transparency example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test App</title>
</head>
<style>
html, body {
height: 100%;