Skip to content

Instantly share code, notes, and snippets.

@vielhuber
vielhuber / script.sh
Last active April 28, 2024 06:38
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@meloonics
meloonics / example.md
Last active April 28, 2024 06:37
Obsidian CSS: Stylable Image containers with captions, made from Callouts

image-paths are obviously broken on this one, you can replace the links with images of your own.

[!fig|left|snail]- ![[snail.png|Snail Facts!|200]] Snails are cool! Click to learn more!

  • Snails r cute :3
  • They be eating leaf
  • Swirly soft-boi chomkers :3333

Read-more [[Le Smail Manifesto|here]]!

[!fig|right|px] ![[meloonics_64.png|64]] It me!

@dreampiggy
dreampiggy / objc_xrefs_helper_hopper_v5.py
Last active April 28, 2024 06:35
Hopper 5 script to support Objective-C relative method list (iOS 14/macOS 11+)
#objective-c xrefs hopper script
#rewrite the IDAPython script https://github.com/fireeye/flare-ida/blob/master/python/flare/objc2_xrefs_helper.py
#author: Kai Lu(@k3vinlusec)
#editor: Zhuoli Li(@dreampiggy)
def getRefPtr(doc,classMethodsVA,objcSelRefs, objcMsgRefs, objcConst):
ret = (None, None)
namePtr = doc.readUInt64LE(classMethodsVA) #get name field in struct __objc_method, it's selector
ctn = 0
@fukamachi
fukamachi / hoge.asd
Created February 18, 2019 04:16
ASDF package-inferred-system sample with :pathname
(defsystem "hoge"
:class :package-inferred-system
:pathname "src"
:depends-on ("hoge/main")
:in-order-to ((test-op (test-op "hoge/tests"))))
(defsystem "hoge/tests"
:pathname "tests"
:depends-on ("hoge")
:components
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@Composable
fun MainScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.surface),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
AnimatedBorderCard(
@paulirish
paulirish / what-forces-layout.md
Last active April 28, 2024 06:31
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@haosdent
haosdent / x_layout.keylayout
Last active April 28, 2024 06:30
Mac OS X Keyboard layout file, works in 10.11
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--
Data generated Wed Mar 23 01:35:41 2022
Generated by kluchrtoxml_64 build 203
-->
<!--Last edited by Ukelele version 351 on 2022-03-23 at 01:45 (GMT+8)-->
@rxaviers
rxaviers / gist:7360908
Last active April 28, 2024 06:30
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: