Skip to content

Instantly share code, notes, and snippets.

View dasheck0's full-sized avatar
:shipit:

Stefan Neidig dasheck0

:shipit:
View GitHub Profile
@dasheck0
dasheck0 / .clinerules
Last active December 22, 2024 14:05
.clinerules
# General instructions
- log every change you make with a summary and files you have changed in a log file named cline_history.md. If it doesn't exist, then create it as well. make sure to include the datetime of your changes and make proper use of the markdown feateres (i.e. headings) to make it readable. Be consistent across the document, meaning, when there is also a certain style and formatting, stick to it. Make sure that your changes are documented sorted by date descending (meaning that latest changes are on top).
- when making commits to this repository, stick to the karma commitlint type of messages. use smaller commits and avoid big, clunky commits that are hard to revert or comprehend. amke also use of the .gitignore file, to avoid commiting sensitive or unneccessary content to repositoriy. If the .gitignore file does not exist, create it
- if you are somewhere stuck, use the brave search in order to find a solution.
# Coding
## Progamming language
@dasheck0
dasheck0 / gist:2ab09121eea1facb9b31140b4f918336
Last active February 7, 2021 14:13
Default nginx.conf for VueJS apps on AWS Linux 2 instances
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
@dasheck0
dasheck0 / cloudSettings
Last active June 12, 2020 08:01
VSCode Settings
{"lastUpload":"2020-06-12T08:01:32.038Z","extensionVersion":"v3.4.3"}
@dasheck0
dasheck0 / snippet.sh
Created March 11, 2020 10:08
[iptables.txt] Some commands for configuring ip tables in a linux 2 aws ec2 instance #aws #iptables #bash #ec2
# iptables
# http://gr8idea.info/os/tutorials/security/iptables1.html
# change policy to drop (if no rule applies, connection will be dropped)
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
# list all rules
iptables -L
@dasheck0
dasheck0 / .editorconfig
Last active April 3, 2020 12:19
[NPM Project boilerplate files] These are some npm boilerplate project files I use #npm #boilerplate #template
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
@dasheck0
dasheck0 / index.bash
Last active January 9, 2020 10:28
[Create node project] Some commands to easily set up node project with some information like license, code of conduct #boilerplate #nodejs #template
# npm set init.author.name "Your name"
# npm set init.author.email "your@email.com"
# npm set init.author.url "https://your-url.com"
# npm set init.license "MIT"
# npm set init.version "1.0.0"
npx license $(npm get init.license) -o "$(npm get init.author.name)" > LICENSE
npx gitignore node
npx covgen "$(npm get init.author.email)"
npm init -y
@dasheck0
dasheck0 / StringAsJson.java
Last active March 30, 2018 12:08
Can be used to format output of toString Method as actual JSON
/*
Formats toString Method output as actual JSON. This way the output can be put into
any JSON prettifier to make it more readable.
You can add a new template using Menu > Code > Generate... > toString() > Settings > Templates
See https://www.jetbrains.com/help/idea/generate-tostring-settings-dialog.html for more information
*/
public java.lang.String toString() {
#if ( $members.size() > 0 )
/**
* Created by s.neidig on 03/05/17.
*/
const Hemera = require('nats-hemera');
const nats = require('nats');
const HemeraJoi = require('hemera-joi');
const config = {
nats: {
/**
* Created by s.neidig on 15/03/17.
*/
const Hemera = require('nats-hemera');
const nats = require('nats');
const HemeraJoi = require('hemera-joi');
const connection = nats.connect('nats://0.0.0.0:4222');
const hemera = new Hemera(connection, {
@dasheck0
dasheck0 / screenrecord.sh
Created December 12, 2016 08:57 — forked from tasomaniac/screenrecord.sh
Screen Record for Android
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi