Skip to content

Instantly share code, notes, and snippets.

@gorobey
gorobey / android-ubuntu
Created August 13, 2020 07:47 — forked from mpaepper/android-ubuntu
How to debug your Android device under Ubuntu
When programming apps for Android, you usually want to test them on real Android devices.
This little gist describes how to do so using Ubuntu 14.
First, you need to download and install the Android development IDE (http://developer.android.com/sdk/index.html) and create an Android project which you want to debug.
Next, you need to setup the debugging mode on your Android device. Starting in Android 4.2 you need to enable the developer options first: 1) Go to settings 2) Go to About Phone 3) Tap the build number 10 times (or more, not sure ;)) and you will get the notification that you enabled it.
Then go to the developer settings and enable the debug mode for your phone.
Now you think you can just plug it into your USB mode? - Nope.
@gorobey
gorobey / linux_fusion360.md
Created December 22, 2020 15:15 — forked from probonopd/linux_fusion360.md
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

@gorobey
gorobey / Python-on-Raspberry.md
Created February 14, 2021 22:38 — forked from lowvoltage/Python-on-Raspberry.md
Setting up a Python3 dev environment on the Raspberry Pi

Install required packages:

$ sudo apt-get install -y python3 python-pip
$ sudo pip install virtualenv

Setup and activate a Python 3 virtual environment named "venv":

$ virtualenv -p python3 venv
$ source venv/bin/activate
@gorobey
gorobey / fail2ban-allstatus.sh
Created April 12, 2021 21:35 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@gorobey
gorobey / divi-breakpoints.css
Created April 13, 2021 11:06 — forked from d8m18n/divi-breakpoints.css
Divi theme breakpoints
/**
* Divi theme breakpoints - thanks to https://divibooster.com/css-media-queries-for-the-divi-theme/
*/
/* Large screens (1405px upwards) */
@media only screen and ( min-width: 1405px ) {
/* your css goes here */
}
/* Laptops and desktops (1100-1405px) */
/**
* My Account
*/
.woocommerce-account .woocommerce-MyAccount-navigation {
width: 20%;
}
.woocommerce-account .woocommerce-MyAccount-content {
display: inline-block;
/*woocommerce pagination*/
.woocommerce nav.woocommerce-pagination{}
.woocommerce nav.woocommerce-pagination ul.page-numbers{}
.woocommerce nav.woocommerce-pagination ul li{}
.woocommerce nav.woocommerce-pagination ul li a{}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover{}
.woocommerce nav.woocommerce-pagination ul li a.prev,
.woocommerce nav.woocommerce-pagination ul li a.next{}
@gorobey
gorobey / wp-meta-description.php
Created June 2, 2021 09:55 — forked from zgordon/wp-meta-description.php
Add Meta Description to WordPress Theme
function custom_get_excerpt($post_id) {
$temp = $post;
$post = get_post( $post_id );
setup_postdata( $post );
$excerpt = esc_attr(strip_tags(get_the_excerpt()));
wp_reset_postdata();
$post = $temp;
<?php
// Change the footer text in Genesis with a back up if blank
add_filter('genesis_footer_creds_text', 'genesischild_footer_text');
function genesischild_footer_text() {
if( get_theme_mod( 'footer_text_block') != "" ) {
echo get_theme_mod( 'footer_text_block');
}
else{
@gorobey
gorobey / functions.php
Created August 23, 2022 17:24 — forked from abecoffman/functions.php
Adds Facebook SDK to Wordpress
<?php
function facebook_sdk_init() {
wp_enqueue_script('jquery');
// instruction to only load if it is not the admin area
if ( !is_admin() ) {
// register and load the facebook sdk
wp_register_script( 'facebook-sdk',
'http://connect.facebook.net/en_US/all.js',
array(), '', TRUE);