Skip to content

Instantly share code, notes, and snippets.

@Daan-Grashoff
Daan-Grashoff / README.md
Last active May 11, 2025 08:43
Bring back the google maps button when searching on google

Google Maps Button Restorer

This userscript brings back the Maps button in Google Search results, making it easy to search locations directly in Google Maps.

Features

  • Adds a Maps button next to the "All", "Images", "News" tabs in Google Search
  • Works across multiple Google domains (.com, .co.uk, .nl, .de, .fr)
  • Automatically updates when using Google's dynamic search
  • Maintains button presence during navigation
@seventhmoon
seventhmoon / TvDeviceTypes.kt
Last active October 31, 2024 09:45
TvDeviceTypes
import android.annotation.SuppressLint
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import androidx.annotation.IntDef
//Make sure you have the following declared in Manifest when running on Android 11+
//<queries>
//<package android:name="com.google.android.tvlauncher" />
//<package android:name="com.google.android.leanbacklauncher" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name="viewport" />
<link rel="icon" href="data:,">
<title>String art</title>
<script type="text/javascript" src="jquery.min.js"></script>
<style>
html, body {
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@thw0rted
thw0rted / relativeOrientation.ts
Created May 4, 2018 12:25
Cesium function to transform relative heading-pitch-roll to absolute rotation Quaternion
import {
Cartesian3,
HeadingPitchRoll,
Matrix3,
Matrix4,
Quaternion,
Transforms,
} from "cesium";
/**
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 23:05:35 2016
@author: Oyc
"""
import os
import requests as req
from bs4 import BeautifulSoup as bs
@lenguyenthedat
lenguyenthedat / Countries.csv
Created April 20, 2015 07:09
Country - Continent codes and names
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
"continent_code", "country_code","continent_name","country_name","country_iso3","country_number","country_full_name
"AS","AF","Asia","Afghanistan","AFG","004","Islamic Republic of Afghanistan"
"EU","AX","Europe","Åland Islands","ALA","248","Åland Islands"
"EU","AL","Europe","Albania","ALB","008","Republic of Albania"
"AF","DZ","Africa","Algeria","DZA","012","People"s Democratic Republic of Algeria"
"OC","AS","Oceania","American Samoa","ASM","016","American Samoa"
"EU","AD","Europe","Andorra","AND","020","Principality of Andorra"
"AF","AO","Africa","Angola","AGO","024","Republic of Angola"
"NA","AI","North America","Anguilla","AIA","660","Anguilla"
"AN","AQ","Antarctica","Antarctica","ATA","010","Antarctica the territory South of 60 deg S"
@revett
revett / README.md
Last active November 7, 2016 11:36
Tutum Zero Downtime Re-deploy

Tutum Zero Downtime Re-deploy

cats.jpg

I tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.

"not a top priority, but by Spring :)"

As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503 errors, so decided to use the following hack (code below) until the feature is officially implemented.

@ddennedy
ddennedy / dash-avc264 command lines
Last active July 27, 2022 03:44
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.