Skip to content

Instantly share code, notes, and snippets.

View XTechnology-TR's full-sized avatar
:shipit:
Focusing

xtechnology XTechnology-TR

:shipit:
Focusing
View GitHub Profile
@grenade
grenade / sane-gnome-settings.sh
Last active February 4, 2024 08:11
my personal gnome and fedora setup preferences
# Sane settings for Gnome
gsettings set org.gnome.desktop.background show-desktop-icons true
gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'grayscale'
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
gsettings set org.gnome.desktop.interface text-scaling-factor '1.0'
gsettings set org.gnome.desktop.interface monospace-font-name "Monospace 10"
gsettings set org.gnome.desktop.interface document-font-name 'Sans 10'
gsettings set org.gnome.desktop.interface font-name 'Cantarell 10'
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
@stormwarning
stormwarning / __wordpress.php
Last active February 29, 2024 03:03
WordPress PROTIPs
/**
* A selection of handy code snippets, plugins, and best practices for WordPress development.
*
*/
@stormwarning
stormwarning / open-graph.html
Created April 1, 2014 23:08
OpenGraph & Twitter Card meta tags.
<meta name="twitter:card" content="[summary]">
<meta name="twitter:site" content="[@handle]">
<meta name="twitter:creator" content="[@handle]">
<meta property="og:url" content="[url]">
<meta property="og:title" content="[title]">
<meta property="og:description" content="[summary]">
<meta property="og:image" content="[image url]">
#!/bin/bash
# Ref: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/#runfile-verifications
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
NVDEVS=`lspci | grep -i NVIDIA`
N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
@vajrasar
vajrasar / size.php
Created November 8, 2015 08:04
To add a Size Guide button that opens an image in lightbox based on category (ring or bangle) and if variation size is set -- WooCommerce
<?php
//To add a Size Guide button that opens an image in lightbox based on category (ring or bangle) and if variation size is set -- WooCommerce
//Use lightbox of your choice
add_action( 'woocommerce_before_add_to_cart_button', 'vg_sizing_placement', 5 );
function vg_sizing_placement() {
global $product, $post;
@octalmage
octalmage / roles.md
Last active May 14, 2023 17:43
Default WordPress user roles and capabilities.

WordPress v4.3.1

Admin wp_capabilities wp_user_level 10

a:1:{s:13:"administrator";b:1;}

Contributor wp_capabilities wp_user_level 1

@dungdt88
dungdt88 / firewall-cmd-rich-rule.md
Last active September 26, 2023 22:42
Allow docker to access all containers within host with firewall-cmd rich rule in Centos 7
#!/bin/sh
gsettings set org.gnome.Evince.Default show-sidebar false
gsettings set org.gnome.Empathy.conversation graphical-smileys false
gsettings set org.gnome.Empathy.conversation spell-checker-languages "en,sv"
gsettings set org.gnome.Empathy.notifications notifications-contact-signin true
gsettings set org.gnome.Empathy.notifications notifications-contact-signout true
gsettings set org.gnome.Empathy.notifications notifications-disabled-away false
gsettings set org.gnome.Empathy.ui show-groups false
gsettings set org.gnome.Empathy.ui show-offline false
#!/bin/bash
# watching while changing
# $ dconf watch /
# list all schemas
# $ gsettings list-schemas
# check keys in a schema
# $ gsettings list-recursively org.gnome.Terminal.Legacy.Settings
@femioladeji
femioladeji / localization.py
Last active July 10, 2022 00:35
Read the car image and convert it to binary
from skimage.io import imread
from skimage.filters import threshold_otsu
import matplotlib.pyplot as plt
car_image = imread("car.jpg", as_gray=True)
# it should be a 2 dimensional array
print(car_image.shape)
# the next line is not compulsory however, a grey scale pixel
# in skimage ranges between 0 & 1. multiplying it with 255