Skip to content

Instantly share code, notes, and snippets.

View maagmirror's full-sized avatar
☄️
easteregg

Maag maagmirror

☄️
easteregg
View GitHub Profile
@maagmirror
maagmirror / autoexec.cfg
Last active May 27, 2023 22:43
csgo config
// move this file into <...>/Counter-Strike Global Offensive/csgo/cfg/
//
// Startup parameters for CS:GO, add these using steam
//-high -nod3d9ex -nojoy -noforcemparms -noforcemaccel -novid -refresh 240 -freq 240 +mat_queue_mode 2 +exec autoexec.cfg -tickrate 128
// more info: https://steamcommunity.com/sharedfiles/filedetails/?id=379782151
//~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--
//Writes in config that autoexec.cfg is being executed
echo "Maag's autoexec.cfg started executing"
@maagmirror
maagmirror / Move WooCommerce Product Long Description Into The Short Description Product Layout.php
Created April 23, 2023 19:26
Move WooCommerce Product Long Description Into The Short Description Product Layout
//Remove WooCommerce Tabs - this code removes all 3 tabs - to be more specific just remove actual unset lines
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
Flexbox big 4:
- display: flex;
- flex-direction
- align-items
- justify-content
@maagmirror
maagmirror / Run_jquery.js
Created January 17, 2023 23:48
jquery on wordpress
window.addEventListener('DOMContentLoaded', (event) => {
(function($) {
console.log('DOM fully loaded and parsed');
})( jQuery );
});
function start_modify_html() {
ob_start();
}
function end_modify_html() {
if(!is_user_logged_in()) {
$html = ob_get_clean();
$html = str_replace( '[paisname]', get_field('paisname', 'option'), $html );
echo $html;
add_filter( "login_headerurl", "custom_loginlogo_url" );
function custom_loginlogo_url($url) {
return "https://nibiru.com.uy";
}
function my_login_logo() { ?>
<style type="text/css">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#largescreen {
display: block;
}
#smallscreen {
display: none;
}
@media (max-width: 640px) {
#largescreen {
@maagmirror
maagmirror / v-install-wordpress-nibiru
Last active March 1, 2024 17:27
Script to install a wordpress in vesta server with changes in database name generator, add the essential plugins, generate good link structure for seo, change lang of the core to spanish, remove unused base themes
#!/bin/bash
# info: WordPress installer in one command line
# options: DOMAIN USER
#
# Credits to Luka Paunović for wp-cli implememtation
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
// Disable zip/postcode field
add_filter( 'woocommerce_checkout_fields' , 'nibiru_remove_billing_postcode_checkout' );
function nibiru_remove_billing_postcode_checkout( $fields ) {
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_state']);
return $fields;
}