export https_proxy="https://my-proxy.com:443"
export http_proxy="https://my-proxy.com:80"
sudo vim /etc/yum.conf
add proxy on first line proxy=https://my-proxy.com:80
[main]
require 'hexapdf' | |
doc = HexaPDF::Document.open("/home/xxxx/Downloads/OoPdfFormExample.pdf") | |
page = doc.pages[0] | |
canvas = page.canvas(type: :overlay) | |
canvas.translate(0, 20) do | |
canvas.fill_color(0.3, 0.7, 0.7) | |
canvas.rectangle(50, 0, 80, 80, radius: 80) |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
function getScrollParent(node) { | |
const isElement = node instanceof HTMLElement; | |
const overflowY = isElement && window.getComputedStyle(node).overflowY; | |
const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden'; | |
if (!node) { | |
return null; | |
} else if (isScrollable && node.scrollHeight >= node.clientHeight) { | |
return node; | |
} |
export https_proxy="https://my-proxy.com:443"
export http_proxy="https://my-proxy.com:80"
sudo vim /etc/yum.conf
add proxy on first line proxy=https://my-proxy.com:80
[main]
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
#!/bin/bash | |
# Might as well ask for password up-front, right? | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Example: do stuff over the next 30+ mins that requires sudo here or there. | |
function wait() { |
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
) | |
func main() { |
Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell
and then run-as com.mypackage
( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs
),
but on a production release app downloaded from an app store you're most likely to see:
run-as: Package 'com.mypackage' is not debuggable
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, [email protected] | |
mkdir mosh | |
cd mosh |