Skip to content

Instantly share code, notes, and snippets.

View kuldipem's full-sized avatar
:shipit:
Looking for new challenges

KULDIP PIPALIYA kuldipem

:shipit:
Looking for new challenges
View GitHub Profile
@kuldipem
kuldipem / start.sh
Last active June 13, 2020 10:00
Ubuntu/Linux shell script to run using cron to confirm services status, if not running then send email and start the service
#!/bin/sh
APACHE2_STATUS="$(systemctl is-active apache2.service)"
MYSQL_STATUS="$(systemctl is-active mysql.service)"
NGINX_STATUS="$(systemctl is-active nginx.service)"
DOVECOT_STATUS="$(systemctl is-active dovecot.service)"
START_SCRIPT_DEBUG="true"
FLAG_STATUS="active"
SendEmail(){
{
"version": 11,
"productTypes": {
"slusher_machines": {
"active": true,
"name": "Slusheis Maschine",
"short_description": "Die Erfrischung mit Werbewirkung für Ihr Event",
"src": "https://www.morlok-services.de/images/stories/preisliste/pl_slush.jpg",
"products": {
"slush_standard": {
const { translate } = require('deepl-translator');
const SOURCE_LAN = 'EN';
const DESTINATION_LAN = 'DE';
const translateTitle = function(txt, cb){
translate(txt, DESTINATION_LAN, SOURCE_LAN)
.then(res => {
/** res will be
{
"data": [
"This is my first sairi",
"This is my second sairi"
]
}
@kuldipem
kuldipem / index.html
Created August 29, 2018 17:08
Morris.js Line Chart Example// source http://jsbin.com/yohegob
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
<meta charset=utf-8 />
<title>Morris.js Line Chart Example</title>
</head>
<body>
Morris.Area({
element: 'smooth-area-chart',
data: [{
month: 'Jan',
completedjobs: 0,
upcomingjobs: 0,
pendingjobs:0
}, {
month: 'Feb',
completedjobs: 150,
{
"success": 1,
"message": "Categories Found",
"data": [
{
"id": "1",
"name": "Life Quotes",
"file": "https://gist.githubusercontent.com/kuldipem/2d372a0081c2900822e85a0e8c63822c/raw/a4a959ecbbf3ac3519a3fc5054395d87f09cad14/rahul-life-quotes.json"
},
{

Keybase proof

I hereby claim:

  • I am kuldipem on github.
  • I am kuldipem (https://keybase.io/kuldipem) on keybase.
  • I have a public key ASDb28zqmy1r9sIhCaoF--0vhQhJA8yFkIeVOn8cEbuYoAo

To claim this, I am signing this object:

@kuldipem
kuldipem / Simple Ajax Login Form.php
Created July 27, 2018 12:26 — forked from cristianstan/Simple Ajax Login Form.php
Wordpress: Simple Ajax Login Form
<?php
//Simple Ajax Login Form
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/
//html
<form id="login" action="login" method="post">
<h1>Site Login</h1>
<p class="status"></p>
<label for="username">Username</label>
<input id="username" type="text" name="username">
@kuldipem
kuldipem / git_checkout_all.sh
Created April 10, 2018 17:57
git copy all remote
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done