Skip to content

Instantly share code, notes, and snippets.

@sal0max
sal0max / GitHub2020.css
Created November 26, 2020 23:01
Current (2020.11.27) Github style for MacDown
body {
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
font-size: 16px;
line-height: 1.5;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
color: #24292e;
margin: 0; }
@sal0max
sal0max / PRIVACY.md
Last active August 2, 2022 11:56
Currencies: Privacy Policy

The World's Greatest Privacy Policy

We don't store your data, period.

We don't have interest in it, we simply don't do it. Enjoy our app, that is all we wish.

import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.JsonReader
import com.squareup.moshi.JsonWriter
import java.io.IOException
import java.util.Date
/**
* Formats dates using a Unix Timestamp.
* To use, add this as an adapter for `Date.class` on your [Moshi.Builder][com.squareup.moshi.Moshi.Builder]:
*
import android.content.Context
import android.support.v7.preference.Preference
import android.support.v7.preference.PreferenceViewHolder
import android.util.AttributeSet
import android.widget.TextView
class LongSummaryPreference(context: Context?,
attrs: AttributeSet?,
defStyleAttr: Int,
defStyleRes: Int) : Preference(context, attrs, defStyleAttr, defStyleRes) {
@sal0max
sal0max / showfullres.js
Last active November 24, 2018 21:37
Use this code as the link of a bookmark in your browser of choice. If you click it while being on a photo page, it will display only the image in the best available resolution. Currently works for 500px, Instagram, Flickr, Fotocommunity, Fstoppers, everydaycarry.com.
javascript: if(document.URL.indexOf("500px.com/photo/")!=-1){var imageSrc=document.querySelector(".photo-show__img").getAttribute("src");window.location=imageSrc}else if(document.URL.indexOf("instagram.com/p/")!=-1){var tag=document.querySelector("meta[property='og:image']");var imageSrc=tag.getAttribute("content");window.location=imageSrc}else if(document.URL.indexOf("fotocommunity.de/photo/")!=-1){window.location=document.querySelector("meta[property='og:image']").getAttribute("content").replace(/width=\d+/g, "width=1920")}else if(document.URL.indexOf("fstoppers.com/photo/")!=-1){window.location=document.querySelector("div.photo>img").getAttribute("src")}else if(document.URL.indexOf("everydaycarry.com/posts/")!=-1){var imageSrc=document.documentElement.innerHTML.match(/http\S+uploads\/\d\S+(?=\?)/g);window.location=imageSrc;}else if(document.URL.indexOf("flickr.com/photos/")!=-1){var parser=new DOMParser();var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET",document.URL.replace(/(.*\/\d+)(.*)/g,"$1")+"/size