Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<style>
#map {
height: 400px;
width: 100%;
}
#searchTextField {
@QNimbus
QNimbus / gitclean.sh
Created January 10, 2024 11:31
Git scripts & tools #git #scripts
#!/bin/bash
#
# By Zibri (2019)
# Modified by @rokibhasansagar
# Modified by @qnimbus
#
# Bash script to remove all revisions from github or gist repository.
#
# Usage: gitclean git-repo-url
#
@eneserdo
eneserdo / understanding_mha.ipynb
Last active April 25, 2024 09:55
Understanding torch.nn.MultiheadAttention
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eladnava
eladnava / server.js
Created November 13, 2020 04:28
Get Facebook Ads Lead Notifications in Realtime with Node.js
const axios = require('axios');
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = 3000;
// Enter the Page Access Token from the previous step
const FACEBOOK_PAGE_ACCESS_TOKEN = '_______________________________';
@hugo-dc
hugo-dc / icons.abap
Created June 5, 2012 17:41
SAP ICON Codes
Icon_Length ID
Name Quickinfo
ICON_2 ICON_DUMMY '@00@'." PlaceholderIcon
ICON_2 ICON_CHECKED '@01@'." Checked; OK
ICON_2 ICON_INCOMPLETE '@02@'." Incomplete
ICON_2 ICON_FAILURE '@03@'." Failed
ICON_2 ICON_POSITIVE '@04@'." Positive
ICON_2 ICON_NEGATIVE '@05@'." Negative
ICON_2 ICON_LOCKED '@06@'." Locked
ICON_2 ICON_UNLOCKED '@07@'." Free; unlock

CLang optimizations on Mac OSX

Version:

Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix

This was made with commands:

@aconite33
aconite33 / bloodhoundce_import.py
Created August 15, 2023 23:04
Import large files into BloodHound CE Edition
import requests
import json
import time
import argparse
import getpass
import os
import sys
def main():
@rphlmr
rphlmr / clear-db.ts
Last active April 25, 2024 09:47
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@rphlmr
rphlmr / helpers.ts
Last active April 25, 2024 09:47
Drizzle ORM, deep sub queries
/* -------------------------------------------------------------------------- */
/* More here; */
/* -------------------------------------------------------------------------- */
//gist.github.com/rphlmr/0d1722a794ed5a16da0fdf6652902b15
https: export function distinctOn<Column extends AnyColumn>(column: Column) {
return sql<Column["_"]["data"]>`distinct on (${column}) ${column}`;
}
export function jsonBuildObject<T extends SelectedFields>(shape: T) {
@DewaldDeJager
DewaldDeJager / README.md
Last active April 25, 2024 09:47
Easy GitHub workflow for keeping a fork in sync with upstream

Sync Fork

This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml.

It runs daily to sync the default branch and can be triggered manually for any branch.