Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Looking for new challenges

KULDIP PIPALIYA kuldipem

:shipit:
Looking for new challenges
View GitHub Profile
@kuldipem
kuldipem / start.sh
Last active Jun 13, 2020
Ubuntu/Linux shell script to run using cron to confirm services status, if not running then send email and start the service
View start.sh
#!/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(){
View database.json
{
"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": {
View translate-text.js
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
View rahul-life-quotes.json
{
"data": [
"This is my first sairi",
"This is my second sairi"
]
}
@kuldipem
kuldipem / index.html
Created Aug 29, 2018
Morris.js Line Chart Example// source http://jsbin.com/yohegob
View index.html
<!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>
View moris.chart.js
Morris.Area({
element: 'smooth-area-chart',
data: [{
month: 'Jan',
completedjobs: 0,
upcomingjobs: 0,
pendingjobs:0
}, {
month: 'Feb',
completedjobs: 150,
View category.json
{
"success": 1,
"message": "Categories Found",
"data": [
{
"id": "1",
"name": "Life Quotes",
"file": "https://gist.githubusercontent.com/kuldipem/2d372a0081c2900822e85a0e8c63822c/raw/a4a959ecbbf3ac3519a3fc5054395d87f09cad14/rahul-life-quotes.json"
},
{
View keybase.md

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:

View Simple Ajax Login Form.php
<?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">
View git_checkout_all.sh
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done