Skip to content

Instantly share code, notes, and snippets.

View koconder's full-sized avatar
:octocat:

Vincent Koc koconder

:octocat:
View GitHub Profile
@koconder
koconder / README.md
Last active January 3, 2024 00:58
Buy Me A Coffee - Sheilds.io Small Style

Buy Me a Coffee

This is unsing the "smaller" style of sheilds.io which most developers like to use.

Using inlined HTML

Buy Me A Coffee

<a href="https://www.buymeacoffee.com/koconderi" target="_blank"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee" alt="Buy Me A Coffee"></a>
@koconder
koconder / graph_agent.md
Created December 5, 2023 08:39
LLM Prompt for Graph Agent

You are a document to graph generation assistant. You task is to meticulously take some high level concepts, entities and summary of a research paper in JSON and convert this into a graph.

  • You will respond back only in JSON with nodes and edges
  • You will take a JSON of entities, summary and arguments for a given research paper and convert into a graph to better understand the relationship of the ideas
  • You will breakdown larger terms into smaller ideas where possible
  • You will ensure that all the nodes and edges are connected, if not you will connect them
  • If you are still unable to connect all the nodes and edges, you will connect these to the core/main idea
  • You will not make assumptions and only stick to the information provided

Please be critical and discerning in your evaluations.

@koconder
koconder / custom_attribution_big_query.sql
Created June 27, 2023 12:46
Custom GA4 Attribution Model
/*
GA4 Attribution Model
This query is designed to replicate the old Universal Analytics attribution
model in Google Analytics 4 (GA4). It calculates the source, medium,
campaign, and event rank for each user based on their events. It also retrieves
purchase data and joins it with the first events to attribute the purchase
to a specific source, medium, and campaign.
@koconder
koconder / README.md
Last active June 18, 2023 12:25
Clean Up Redash Database

Cleanup Redash Queries (Housekeeping)

Use the following clean-up scripts to help locate redundant queries, widgets, dashboards and alerts within Redash. This was mostly to keep lineage lean and reduce discovery of redundant reports and data:

@koconder
koconder / hash.py
Created June 18, 2023 11:14
SHA256 a CSV file using Pandas
import pandas as pd
import hashlib
# Load the csv file into a pandas DataFrame
df = pd.read_csv('filename.csv')
# Define a function to hash a string
def hash_for_google(input):
if pd.isnull(input):
return None

Keybase proof

I hereby claim:

  • I am koconder on github.
  • I am zuperduper (https://keybase.io/zuperduper) on keybase.
  • I have a public key ASBS0nvfhG7bTHtCVfLmGXDw1WPAMVHe9_LSS0q_eF5RKQo

To claim this, I am signing this object:

@koconder
koconder / gpg_mac.md
Last active June 7, 2022 10:59
Keybase GPG and Git Setup on Mac OS

Setup Tools

brew install gpg
brew install pinentry-mac
brew install --cask gpg-suite
brew install --cask keybase

Export Keys

@koconder
koconder / Wordpress_WPCONFIG_Custom.php
Last active January 14, 2019 23:09
Disable XML-RPC Pingbacks on Wordpress for Wp-Config
<?php
// Disable pingback.ping xmlrpc method to prevent Wordpress from participating in DDoS attacks
// More info at: https://docs.bitnami.com/?page=apps&name=wordpress&section=how-to-re-enable-the-xml-rpc-pingback-feature
// remove x-pingback HTTP header
add_filter('wp_headers', function($headers) {
unset($headers['X-Pingback']);
return $headers;
});
// disable pingbacks
@koconder
koconder / Update_Wordpress_Hostname.sql
Last active January 14, 2019 23:10
Wordpress Site Migration SQL Command - Commands to Find and Replace Meta, Site Options and Site Content for Hostnames
UPDATE wp_options SET option_value = replace(option_value, 'http://thismagicday.com.192.168.1.15.xip.io', 'http://thismagicday.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://thismagicday.com.192.168.1.15.xip.io','http://www.thismagicday.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://thismagicday.com.192.168.1.15.xip.io', 'http://thismagicday.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://thismagicday.com.192.168.1.15.xip.io','http://thismagicday.com');
@koconder
koconder / Affiliate Cookie
Last active January 14, 2019 23:13
Dead simple affiliate query string to 30 day cookie in Apache HTACCESS Config