Skip to content

Instantly share code, notes, and snippets.

View jerlendds's full-sized avatar
https://cip.org/whitepaper

Nivalis ❆ jerlendds

https://cip.org/whitepaper
View GitHub Profile
@jerlendds
jerlendds / mp4-to-gif
Last active February 14, 2024 03:31
mp42gif
#!/bin/bash
ffmpeg \
-i "$1" \
-r "$2" \
-vf "scale=512:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
"$1.gif"
@jerlendds
jerlendds / cses.json
Last active December 13, 2023 16:44
[
{
"label": "GEOSINTsearch",
"tooltip": "Searches within posts from Twitter, Reddit and 4Chan and presents anything that contains a Google Maps link",
"value": "https://cse.google.com/cse?cx=015328649639895072395:sbv3zyxzmji"
},
{
"label": "Pasted tekst",
"tooltip": "Look if any specifc text has been posted before",
"value": "https://cse.google.com/cse/publicurl?cx=013991603413798772546:nxs552dhq8k"
#!/bin/bash
PROJECT_NAME=todo
SEMVER_FILE=./version.sh
version=0.0.0
if [ -f "$SEMVER_FILE" ]; then
source $SEMVER_FILE
version=$SEMVER
fi
@jerlendds
jerlendds / get_cse_set.py
Last active August 26, 2021 00:08
Retrieve all CSE links from a start.me webpage by passing in the page id
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import List
import requests
import json
def get_startme_links(page_ids: List[str] = None):
if page_ids is None:
raise ValueError(f"expected list of start.me ids, received: {page_ids}")
from dataclasses import dataclass
@dataclass
class HexCode(str):
hex: str
def rgb(self):
hex_string = self.hex.lstrip('#')
lv = len(hex_string)
return tuple(int(hex_string[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
#!/usr/bin/python
# -*- coding: utf-8 -*-
# tuic - textual user interface controller
# Experiments With Curses | 2021, July 17
# I'm currently working on writing a simple TUI for a web crawler
# that supports scraping and analyzing anything you want to write a plugin for.
# This file creates two windows and draws boxes around the created windows
# The windows respond to the terminal resizing and the terminal display will be redrawn to reflect the new size
# KNOWN ISSUES: When terminal size becomes too small the program crashes
import requests
class PlacesAutocomplete:
"""https://developers.google.com/maps/documentation/places/web-service/autocomplete?hl=id
Args:
components (str) : expects country code e.g. country:ca
place_types (str) : e.g. (cities)
key (str) : Google Places autocomplete API key