Skip to content

Instantly share code, notes, and snippets.

View zz2115's full-sized avatar
:octocat:

z zz2115

:octocat:
View GitHub Profile
@supersonictw
supersonictw / ollama-export.sh
Last active May 31, 2025 05:44
Ollama Model Export Script
#!/bin/bash
# Ollama Model Export Script
# Usage: bash ollama-export.sh vicuna:7b
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553
# Interrupt if any error occurred
set -e
# Declare
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active June 17, 2025 10:36
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@thisisnic
thisisnic / pre-commit
Created August 26, 2021 17:03
pre-commit file which runs styler on everything
#!/bin/bash
set -e
SOURCE_DIR='<path_to_project_root_goes_here>'
# Find all .R files which have been staged via git add
FILES_TO_STYLE=$(git diff --name-only --staged | grep "\.R")
for FILE in ${FILES_TO_STYLE[@]}
do
@raveenb
raveenb / ssh_into_android.md
Last active May 5, 2025 11:07
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@rvanbruggen
rvanbruggen / graphtechnologygraph_import.cypher
Last active December 18, 2022 01:54
Graph Technology Landscape Graph
create index on :Node(name);
//load the data in raw form
Load csv with headers from "https://docs.google.com/spreadsheets/u/0/d/17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI/export?format=csv&id=17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI&gid=112267709" as csv
Merge (n:Node {name: csv.Name, type: csv.Type, tags: csv.Tags, link: csv.Link});
// move the 'type' property to a label and remove it as a property, USING APOC (not supported in Graphgist)
MATCH (n:Node)
with n, split(n.type, ",") AS futurelabels
unwind futurelabels as futurelabel
@jexp
jexp / ms-concepts-import.sh
Created November 4, 2016 02:32
Load and query the Microsoft Concept Graph in Neo4j https://concept.research.microsoft.com/Home/Introduction
function import_extract_first {
echo "name:ID(Concept)" > concepts.txt
cat data-concept-instance-relations.txt | cut -d $'\t' -f 1 | sort | uniq >> concepts.txt
echo "name:ID(Instance)" > instances.txt
cat data-concept-instance-relations.txt | cut -d $'\t' -f 2 | sort | uniq >> instances.txt
echo $':END_ID(Concept)\t:START_ID(Instance) relations:int' > is_a.hdr
$NEO4J_HOME/bin/neo4j-import --into concepts.db --id-type string --delimiter TAB --bad-tolerance 13000000 --skip-duplicate-nodes true --skip-bad-relationships true \
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 17, 2025 06:11
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'