Skip to content

Instantly share code, notes, and snippets.

@hakre
hakre / dl-file.php
Created January 2, 2012 21:41
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@ayebrian
ayebrian / vmware.md
Last active April 20, 2024 15:42
VMware ESXi 8 / vCenter 8 / Workstation 17 8 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

ESXi 8

Key Tested
@Klerith
Klerith / configurar-node-ts.md
Last active April 20, 2024 15:42
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
class GildedRose
def initialize(items)
@items = items
end
def update_quality()
@items.each do |item|
if item.name != "Aged Brie" and item.name != "Backstage passes to a TAFKAL80ETC concert"
if item.quality > 0
if item.name != "Sulfuras, Hand of Ragnaros"
@zeburek
zeburek / api.md
Last active April 20, 2024 15:41
Чек-лист проверок API

Чек-лист API тестов

  • Корректность структуры данных
  • POST запросы
    • Заполнены все поля валидными данными
    • Заполнены только обязательные поля
    • Заполнены не все обязательные поля
    • Не заполнено ни одно поле
    • Валидация данных в полях (корректные и некорректные данные)
    • Пустой JSON
  • Дата создания объекта
@vasanthk
vasanthk / System Design.md
Last active April 20, 2024 15:40
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?
@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active April 20, 2024 15:36
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`&gt;`を記述します。ネストは`&gt;`を多重に記述します。 ```
&gt; 引用 &gt; 引用
&gt;&gt; 多重引用
``` &gt; 引用 &gt; 引用
&gt;&gt; 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active April 20, 2024 15:35
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@raivisdejus
raivisdejus / Kostal_PIKO_3.0-2_MP_plus_Home_Assistant.md
Created October 9, 2022 16:33
Home Assistant configuration for Kostal PIKO 3.0-2 MP plus

If your Kostal Pico MP inverter provides data on http://your-inverter-ip/measurements.xml

Install https://github.com/danieldotnl/ha-multiscrape and use the following configuration to get the data to Home Assistant

Add this to the configuration.yaml and change the inverter IP from 192.168.0.90 used in the example to whatever is your inverter IP.

# Kostal inverter    
multiscrape:
  - resource: http://192.168.0.90/measurements.xml
@michaelmrose
michaelmrose / zathu
Created September 12, 2015 01:45
zathura config
# Zathura configuration file
# See man `man zathurarc'
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries