Skip to content

Instantly share code, notes, and snippets.

@sanrandry
sanrandry / vue_uikit.md
Last active October 5, 2020 07:33
vue uikit plugin

this is how we import a uikit with vue cli or nuxt js

form nuxt js

import the css in the css section on nuxt.config.js

 // Global CSS (https://go.nuxtjs.dev/config-css)
  css: ["@/assets/css/uikit.min.css"],

create a new plugin in the plugin directory and add this lines of code

import Vue from "vue";
@sanrandry
sanrandry / media-query.css
Created October 15, 2020 16:22 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@sanrandry
sanrandry / wordpress_nav_walker.md
Last active May 29, 2023 17:38
wordpress nav walker

wordpress nav walker

create a walker.php file

create a walker.php file or what ever the name is, its not matter. Then create a class who extend the default wordpress Walker_Nav_Menu

class My_Custom_Walker extends Walker_Nav_Menu {

}

overwrite some method

@sanrandry
sanrandry / wordpress_custom_widget.md
Created October 28, 2020 07:58
wordpress custom widget

create wordpress custom widget

add this code to you function.php file

create the custom widget class

frist create a custom widget class that extend the default wordpress widget class this code is from the official wordpress code reference

class My_Widget extends WP_Widget {

	/**
	 * Sets up the widgets name etc
@sanrandry
sanrandry / install.md
Created December 16, 2020 20:24
docker

unsinstall older version

sudo apt-get remove docker docker-engine docker.io containerd runc

set up the repository

update

@sanrandry
sanrandry / debian_amd_driver.md
Last active December 24, 2024 08:03
debian amd driver installation

lspci -nnk | grep -i -EA3 "3d|display|vga"

xrandr

sudo apt-get update sudo apt-get dist-upgrade

sudo apt-get install xserver-xorg-video-ati sudo apt-get install xserver-xorg-video-amdgpu

@sanrandry
sanrandry / 5.py
Created February 2, 2021 04:47
python reminder
from time import time, sleep
import subprocess
while True:
bashCommand = "zenity --notification --text='5'"
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
sleep(60 * 5)
@sanrandry
sanrandry / Disable wyland for skype or screen sharing error.md
Last active March 10, 2022 08:29
Disable wyland for skype or screen sharing error

Disable wyland for skype or screen sharing error

cd /etc/gdm3/
sudo vim daemon.conf

unocoment the line: WaylandEnable=false

@sanrandry
sanrandry / caculate_navbar_height.md
Last active September 19, 2023 15:24
calculate navbar height
  • add this javascript
document.documentElement.style.setProperty('--nav-height', document.getElementById("navbar").offsetHeight);
  • use property iny css
:root {
    --nav-height: 70px; /*You HAVE To Give A Default Fallback Value*/
}
@sanrandry
sanrandry / gitlab community edition installation ruby wait error.md
Created November 3, 2021 12:00
gitlab community edition installation ruby wait error

if you have this error

 * link[/opt/gitlab/service/redis] action create
  - create symlink at /opt/gitlab/service/redis to /opt/gitlab/sv/redis
 * ruby_block[wait for redis service socket] action run

execute this command on the server in another terminal

systemctl start gitlab-runsvdir.service