This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Option H shows processes with threads | |
# Command sed ':a; N; $!ba; s/\n/,/g' replaces \n to , if process have some subprocesses | |
watch -d ps -auH -q $(pgrep "Process name 1" | sed ':a; N; $!ba; s/\n/,/g'),$(pgrep "Process name 2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <opencv2/core.hpp> | |
#include <opencv2/videoio.hpp> | |
#include <opencv2/imgproc.hpp> | |
#include <opencv2/highgui.hpp> | |
#include <opencv2/objdetect.hpp> | |
#include <iostream> | |
#include <vector> | |
using namespace cv; | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let Reset = "\x1b[0m", | |
Bright = "\x1b[1m", | |
Dim = "\x1b[2m", | |
Underscore = "\x1b[4m", | |
Blink = "\x1b[5m", | |
Reverse = "\x1b[7m", | |
Hidden = "\x1b[8m", | |
FgBlack = "\x1b[30m", | |
FgRed = "\x1b[31m", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0 | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
networks: | |
- logging | |
ulimits: | |
memlock: | |
soft: -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
const useStateWithPromise = defaultVal => { | |
let [state, setState] = useState({ | |
value: defaultVal, | |
resolve: () => {} | |
}); | |
useEffect( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = require('express')(); | |
const https = require('https'); | |
const fs = require('fs'); | |
//GET home route | |
app.get('/', (req, res) => { | |
res.send('Hello World'); | |
}); | |
//openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 | |
// we will pass our 'app' to 'https' server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE IF EXISTS update_or_insert; | |
| |
DELIMITER $$ | |
CREATE PROCEDURE update_or_insert(name VARCHAR(80), email VARCHAR(50)) | |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vundle.vim section | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
Plugin 'vim-scripts/vim-auto-save' | |
call vundle#end() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const storeCategories = createStore((state = [], action) => { | |
switch (action.type) { | |
case 'ADD_CATEGORIES': | |
return state.concat([action.categories]); | |
default: | |
return state | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_header Last-Modified $date_gmt; | |
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | |
if_modified_since off; | |
expires off; | |
etag off; |
NewerOlder