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: [email protected]
# 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 / 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": "[email protected]"
}
@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%;
@ronisaha
ronisaha / bn_url_slug.php
Last active March 5, 2017 13:41 — forked from sgmurphy/url_slug.php
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
function url_slug($string = null, $separator = "-") {
if (is_null($string)) {
return "";
}
// Remove spaces from the beginning and from the end of the string
$string = trim($string);
@ronisaha
ronisaha / get_title_and_url.applescript
Created August 17, 2016 03:21 — forked from vitorgalvao/Get Title and URL.applescript
Applescript to get frontmost tab’s url and title of various browsers.
# Keep in mind that when asking for a `return` after another, only the first one will be output.
# This example is meant as a simple starting point, to show how to get the information in the simplest available way.
# Google Chrome
tell application "Google Chrome" to return URL of active tab of front window
tell application "Google Chrome" to return title of active tab of front window
# Google Chrome Canary
tell application "Google Chrome Canary" to return URL of active tab of front window
tell application "Google Chrome Canary" to return title of active tab of front window
# Chromium