Skip to content

Instantly share code, notes, and snippets.

@d9k
d9k / superset_config_docker.py
Created January 13, 2022 07:44
Superset welcome page redirect
import logging
import pprint
from flask import Flask, redirect
from flask_appbuilder import expose, IndexView
from superset.typing import FlaskResponse
logger = logging.getLogger()
@funatsufumiya
funatsufumiya / of-vscode-project-generator.sh
Last active May 6, 2024 04:02
VSCode Project Generator for openFrameworks 0.9.8 - 0.12.x, compatible with Mac, Windows (git-bash), Linux
#!/bin/bash
##
## << How to install >>
## $ curl -Lo g.sh http://bit.ly/of-vscode
## $ chmod +x g.sh
## $ mv g.sh /usr/local/bin/of-vscode-project-generator
##
echo
@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active May 6, 2024 04:00
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 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 03:49
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@aleduca
aleduca / powershell.txt
Last active May 6, 2024 03:47
Powershell - oh my posh
- Baixar o powershell: https://learn.microsoft.com/pt-br/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#winget
- NerdFont: https://www.nerdfonts.com/font-downloads
- Oh My Posh: https://ohmyposh.dev/
- Criar arquivo de config: .$PROFILE ou code $PROFILE
- Instalar PSReadline: Install-Module PSReadLine -AllowPrerelease -Force
- Instalar icones: Import-Module -Name Terminal-Icons
- Apelido para comandos:
function executeArtisanCli {
php artisan $args
}
@hijrahsaputra
hijrahsaputra / Apple_mobile_device_types.txt
Created May 6, 2024 03:46 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@al3xtjames
al3xtjames / flake.nix
Last active May 6, 2024 03:45
Thunderbolt NVM firmware
{
description = "Minimal NixOS installation media";
inputs.nixos.url = "nixpkgs/nixos-23.11";
outputs = { self, nixos }: {
nixosConfigurations = {
exampleIso = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix"
({
@ethack
ethack / TypeClipboard.md
Last active May 6, 2024 03:41
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.