Skip to content

Instantly share code, notes, and snippets.

View voituk's full-sized avatar

Vadym Voitiuk voituk

  • Amazon Web Services
  • Berlin, Germany
  • LinkedIn in/voituk
View GitHub Profile
@kortina
kortina / pocket-bookmarklet.js
Created March 31, 2020 02:47
Pocket Bookmarklet That Avoids Cookie Errors
// Was getting the following error on many sites with the 'official' Pocket Bookmarklet
// ( available at https://getpocket.com/add/?ep=1 )
//
// VM171:1 Refused to load the script 'https://getpocket.com/b/r4.js?h=qqualnjcokmhwrrxefqvqbftooidhfpmommvsfsecblmtqugvmwf46684f1f0&u=https%3A%2F%2Fwww.linkedin.com%2Fpulse%2Fmechanics-war-economy-ray-dalio%2F&t=(6)%20The%20Mechanics%20of%20the%20War%20Economy%20%7C%20LinkedIn'
// because it violates the following Content Security Policy directive:
// "script-src 'report-sample' 'sha256-6gLjSWp3GRKZCUFvRX5aGHtECD1wVRgJOJp7r0ZQjV0=' 'unsafe-inline' s.c.lnkd.licdn.com static-fstl.licdn.com static-src.linkedin.com https://www.linkedin.com/voyager/service-worker-push.js s.c.exp1.licdn.com s.c.exp2.licdn.com static-lcdn.licdn.com s.c.lcdn.licdn.com https://www.linkedin.com/sc/ https://www.linkedin.com/scds/ https://qprod.www.linkedin.com/sc/ https://www.linkedin.com/sw.js https://www.linkedin.com/voyager/abp-detection.js https://snap.licdn.com/li.lms-analytics/insight.mi
@seanKenkeremath
seanKenkeremath / Android Lollipop Widget Tinting Guide
Last active November 17, 2023 12:40
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@cbeyls
cbeyls / PreferenceFragment.java
Last active April 6, 2023 09:07
A PreferenceFragment for the Android support library. Based on the platform's code with some removed features and a basic ListView layout.It uses reflection but works with every device I've tested so far.
package android.support.v4.preference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
/*global sforce:true */
(function() {
function loadScript(url, callback) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
if (callback) {
script.onload = callback;
script.onreadystatechange = function() {
anonymous
anonymous / proto.js
Created July 2, 2011 14:04
Prototype question
function A() {
this.sayFoo = function() {
console.log("foo");
};
}
A.prototype.sayFoo = function() {
console.log("bar");
};