Skip to content

Instantly share code, notes, and snippets.

" commentry Plugin
:set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" vundle
Plugin 'VundleVim/Vundle.vim'
" theme
Plugin 'liuchengxu/space-vim-dark'
" nerd tree and tagbar
@yzdann
yzdann / gist:e3de21556d10a93a54f897df4b4101f2
Created June 30, 2020 06:55 — forked from jtdp/gist:5443498
Revert file permission changes in local git repository.. Very useful when you change permissions due to working on a samba share. Lifted from: http://stackoverflow.com/questions/2517339/git-how-to-recover-the-file-permissions-git-thinks-the-file-should-be
git diff -p \
| grep -E '^(diff|old mode|new mode)' \
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \
| git apply
@yzdann
yzdann / redis_cheatsheet.bash
Created June 20, 2020 11:30 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>List of Links</title>
</head>
<body>
<h1>Links</h1>
<ul>
from typing import List
from pprint import pprint
import argparse
import wikipedia
def search_for_results(search: str, limit: int) -> List[str]:
wikipedia.set_lang("en")
search_result_list = wikipedia.search(query=search, results=limit)
stream {
server {
listen xxx;
ssl_certificate /etc/xxx/xxx.crt;
ssl_certificate_key /etc/xxx/xxx/xxx.key;
ssl_dhparam /etc/xxx/xxx/ssl-dhparams.pem;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
from datetime import timedelta
import pandas
def read_csv(file_name):
file_name_with_extension = f"{file_name}.csv"
df = pandas.read_csv(file_name_with_extension, parse_dates=["Date"])
df = df[["Zone", "Date", "Status Code", "Response Time"]]
return df
@yzdann
yzdann / setup
Last active April 30, 2020 20:48
cp wg-up-down.sh /usr/loca/bin/wg-up-down
chmod +x /usr/local/bin/wg-up-down
# set img
# add .desktop to ~/.config/xfce4/panel/launcher-x/
@yzdann
yzdann / jail.local
Last active May 9, 2020 06:08 — forked from Nihisil/jail.local
Send notifications to the Slack from fail2ban
...
action_with_slack_notification = %(banaction)s[name=%(__name__)s, port="%(port)$
slack[name=%(__name__)s]
action = %(action_with_slack_notification)s
...