Skip to content

Instantly share code, notes, and snippets.

View dineshnagarit's full-sized avatar
🎯
Focusing

Dinesh Nagar dineshnagarit

🎯
Focusing
View GitHub Profile
@dineshnagarit
dineshnagarit / employees.json
Created May 25, 2020 11:51
employees description
public static employees = [
{
'id' :'1',
'name' : 'John',
'empId' : 'IN-11334',
'address' : {
'city': 'Noida',
'state' :'UP',
'fulladdress':'B-7 Kent RO Sec 57'
#include <stdio.h>
void printArray (int arr[], int n);
int AreAll9s (int num[], int n );
void generateNextPalindromeUtil (int num[], int n )
{
int mid = n/2;
bool leftsmaller = false;
const request = require("request-promise-native");
async function processData() {
try {
let response = await request("https://www.andreasjakl.com/");
if (response.length > 100) {
let response2 = await request("https://www.andreasjakl.com/wp-content/uploads/2018/08/arcore-anchors.gif");
console.log("Data: ", response2.substring(0,10));
}
} catch (error) {
systemctl start service-name
systemctl status service-name
systenctl stop service-name
systemctl enable service-name
systemctl disable service-name
systemctl is-enabled service-name //To check whether the service is currently configured to start on the next boot up
systemctl is-active service-name //To check whether the service is active
How to remove Systemd services completely
systemctl stop service-name
#!/bin/bash
DAEMON_PATH=/opt/kafka/
PATH=$PATH:$DAEMON_PATH/bin
# See how we were called.
case "$1" in
start)
# Start daemon.
echo "Starting Zookeeper";
export default {
getParams() {
const scripts = document.getElementsByTagName('script'),
myScript = scripts[scripts.length - 1],
query = myScript.src.replace(/^[^\?]+\??/, '');
let Params = {};
if ( !query ) { return Params } // return empty object
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
# This configuration file is provided on an "as is" basis,
# with no warranties or representations, and any use of it
# is at the user's own risk.
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
@dineshnagarit
dineshnagarit / nginx.conf
Created March 17, 2016 14:29 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
<link rel="import" href="/bower_components/iron-list/iron-list.html">
<link rel="import" href="/bower_components/iron-form/iron-form.html">
<link rel="import" href="/bower_components/paper-input/paper-input.html">
<link rel="import" href="/bower_components/paper-button/paper-button.html">
<link rel="import" href="/bower_components/firebase-element/firebase.html">
<link rel="import" href="/bower_components/firebase-element/firebase-collection.html">
<dom-module id="categories-list">
<style>
:host {