Skip to content

Instantly share code, notes, and snippets.

@sanrandry
sanrandry / debian_amd_driver.md
Last active January 19, 2021 16:28
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 / 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 / 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 / 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 / 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 / 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 / wordpress.md
Last active October 29, 2020 08:55
word press note

create setup function

your_theme_name_setup() {

}
add_action('after_setup_theme', 'rakitra_janga_setup');

include assets

add those line of code to function.php

@sanrandry
sanrandry / rakitra_note.md
Last active August 19, 2020 08:03
rakitra note
@sanrandry
sanrandry / wordpress theme starter.md
Last active August 8, 2020 09:58
wordpress theme starter

wordpress theme starter

create a the theme folder

create index.php and style.css

add comment to style.css

cpoy the comment in the index.css in the default theme to your index.css and edit it.

try to loop the post on the index.php page

<!DOCTYPE html>
<html lang="en">
@sanrandry
sanrandry / tets encribpt dist tmp.md
Created August 4, 2020 05:02
tets encribpt dist tmp
  1. https://certbot.eff.org/

sudo apt-get update sudo apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install python-certbot-nginx

  1. Auto, works when you have one virtual server on nginx