#!/usr/bin/env bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
Vodafone forces its customers to use their modem/router, the "Vodafone Station": using any other router is impossible because authentication is being done via a custom PPPoE setup.
In the PPPoE packet there is a field named Host-Uniq which is used to separate packets from different PPPoE sessions: Vodafone requires the Station serial number to be put in this field as authentication.
A Linux router with root access is needed to replace the Station with. With an xDSL connection a modem with a custom firmware like OpenWrt has to be used, most likely one based on a Lantiq SoC.
For a FTTH internet connection then every machine with at least two gigabit ethernet interface and a decent CPU will do it.
LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name` |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.ResolveInfo; | |
import android.content.res.AssetFileDescriptor; | |
import android.database.Cursor; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Matrix; | |
import android.media.ExifInterface; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Power Saving Mode detection</title> | |
</head> | |
<body> | |
<div>Power Saving Mode? <code id="powerSavingMode"></code></div> | |
<script type="module"> |
//http://gamedev.stackexchange.com/questions/59797/glsl-shader-change-hue-saturation-brightness | |
vec3 rgb2hsv(vec3 c) | |
{ | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
float d = q.x - min(q.w, q.y); | |
float e = 1.0e-10; | |
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); |
This is a sample PHP script to retrieve the access token from Service Account of Google without using googleapis.
<?php
$private_key = "-----BEGIN PRIVATE KEY-----\n###-----END PRIVATE KEY-----\n"; // private_key of JSON file retrieved by creating Service Account
global $sitepress; | |
$translated_term_id = icl_object_id($term_id, $taxonomy, true, $language_code); | |
remove_filter( 'get_term', array( $sitepress, 'get_term_adjust_id' ), 1 ); | |
$translated_term_object = get_term_by('id', $translated_term_id, $taxonomy); | |
add_filter( 'get_term', array( $sitepress, 'get_term_adjust_id' ), 1, 1 ); |
package leo.sortorsplode; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.Screen; | |
import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
public class TransitionScreen implements Screen { | |
private Screen currentScreen; | |
private Screen nextScreen; |