Skip to content

Instantly share code, notes, and snippets.

@eaybek
eaybek / docker_names.py
Created August 21, 2021 12:38 — forked from philchristensen/docker_names.py
Generate random Docker-style names.
import random
def get_random_name():
index = random.randint(0, len(adjectives) - 1)
jndex = random.randint(0, len(names) - 1)
return adjectives[index] + ' ' + names[jndex]
adjectives = [
"admiring",
"adoring",
@eaybek
eaybek / TrueColour.md
Created August 24, 2019 23:37 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
#!/bin/sh
#
# it's a little one liner which creates __init__.py all folders under current dir recursively
#
# effects: ALL sub directories RECURSIVELY under CURRENT directory
# does: <touch __init__.py>
#
find . -type d -exec sh -c "cd {} ;if ! [ -e __init__.py ]; then touch __init__.py; fi" ';'
@eaybek
eaybek / matplotlib.md
Created August 20, 2019 08:56 — forked from ax3l/matplotlib.md
Matplotlib: Axes vs Axis vs Figure vs ...
@eaybek
eaybek / meta-tags.md
Last active March 27, 2019 18:48 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags
/* Begin Here */
UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_links SET link_url = replace(link_url, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_links SET link_image = replace(link_image, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
/*UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl' OR option_name = 'widget_text' OR option_name = 'dashboard_widget_options';*/
UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com');
style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0 #yazının arkasındaki bölümün şeffaflığı 0 hiç görünmesin diye
XfdesktopIconView::shadow-x-offset = 2 # yazıya gölge
XfdesktopIconView::shadow-y-offset = 2 # yazıya gölge
XfdesktopIconView::shadow-color = "#000000" # gölge rengi
base[NORMAL] = "#000000" #yazının arkasındaki bölümün rengi
base[SELECTED] = "#000000" #seçili elemanlar için renk
base[ACTIVE] = "#000000" #aktif elemanlar için renk
#if you add this line to your bashrc file before every command your terminal will change desktop and rise
export PROMPT_COMMAND='wmctrl -i -R $WINDOWID'
#if you add this line to your bashrc file before every command you change desktop and terminal will rise
# export PROMPT_COMMAND='wmctrl -i -a $WINDOWID'
#!/bin/bash
sudo rm /var/crash/*
U(){ echo $(( $1 || 0 )); }
#usage . /path/to/bashstep.sh