Skip to content

Instantly share code, notes, and snippets.

View blade93ny's full-sized avatar

VZ blade93ny

  • 3rd from the Sun (Terra Prime)
View GitHub Profile
@blade93ny
blade93ny / AddressInput.vue
Created February 15, 2021 11:05 — forked from reinink/AddressInput.vue
Multiple v-models in Vue 3
<template>
<input type="text" :value="address" @input="$emit('update:address', $event.target.value)">
<input type="text" :value="city" @input="$emit('update:city', $event.target.value)">
<input type="text" :value="region" @input="$emit('update:region', $event.target.value)">
<input type="text" :value="country" @input="$emit('update:country', $event.target.value)">
<input type="text" :value="postal" @input="$emit('update:postal', $event.target.value)">
</template>
<script setup>
import { defineProps } from 'vue'
@blade93ny
blade93ny / open-cmder-here.md
Created October 7, 2020 18:32 — forked from hamzahamidi/open-cmder-here.md
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
    @="Open Cmder Here"
 "Icon"="\"%CMDER_ROOT%\\icons\\cmder.ico\",0"
@blade93ny
blade93ny / m3u8.md
Created March 21, 2019 06:14 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@blade93ny
blade93ny / nginx-tuning.md
Created March 18, 2019 21:29 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@blade93ny
blade93ny / nginx.conf
Created February 21, 2019 00:10 — 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
@blade93ny
blade93ny / System Design.md
Created January 10, 2019 01:11 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done
@blade93ny
blade93ny / camel_case_functions.php
Created April 30, 2018 08:13
Here are two PHP functions to convert strings between underscore format and camel case
<?php
/**
* Translates a camel case string into a string with
* underscores (e.g. firstName -> first_name)
*
* @param string $str String in camel case format
* @return string $str Translated into underscore format
*/
function from_camel_case($str) {
$str[0] = strtolower($str[0]);
@blade93ny
blade93ny / .gitignore
Created December 7, 2016 23:36 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@blade93ny
blade93ny / CSS responsive grid of hexagons.markdown
Created June 10, 2015 16:41
CSS responsive grid of hexagons