Skip to content

Instantly share code, notes, and snippets.

Avatar

Dariusz Więckiewicz idarek

View GitHub Profile
View minimal-analytics-4-min.js
/* https://go.tacodewolff.nl/minify */
function a(){const n=localStorage,e=sessionStorage,t=document,o=navigator||{},w="G-XXXXXXXXXX",a=()=>Math.floor(Math.random()*1e9)+1,r=()=>Math.floor(Date.now()/1e3),y=()=>(e._p||(e._p=a()),e._p),b=()=>a()+"."+r(),g=()=>(n.cid_v4||(n.cid_v4=b()),n.cid_v4),f=n.getItem("cid_v4"),A=()=>f?void 0:"1",j=()=>(e.sid||(e.sid=r()),e.sid),m=()=>{if(!e._ss)return e._ss="1",e._ss;if(e.getItem("_ss")=="1")return void 0},d="1",p=()=>(e.sct?(x=+e.getItem("sct")+ +d,e.sct=x):e.sct=d,e.sct),s=t.location.search,v=new URLSearchParams(s),l=["q","s","search","query","keyword"],h=l.some(e=>s.includes("&"+e+"=")||s.includes("?"+e+"=")),c=()=>h==!0?"view_search_results":"page_view",_=()=>{if(c()=="view_search_results"){for(let e of v)if(l.includes(e[0]))return e[1]}else return void 0},i=encodeURIComponent,O=e=>{let t=[];for(let n in e)e.hasOwnProperty(n)&&e[n]!==void 0&&t.push(i(n)+"="+i(e[n]));return t.join("&")},C=!1,E="https://www.google-analytics.com/g/collect",k=O({v:"2",tid:w,_p:y(),sr:(sc
View replace_space_with_underscore.ps
Dir | Rename-Item –NewName { $_.name –replace “,”_” }
View spellcheck_ms_access
Private Sub FieldName_LostFocus()
If Not IsNull(FieldName) Then
With FieldName
.SetFocus
.SelStart = 0
.SelLength = Len(FieldName)
End With
DoCmd.SetWarnings False
RunCommand acCmdSpelling
View selective-woocommerce-square.php
<?php
/**
*
* Plugin Name: Selective WooCommerce Square
* Plugin URI: https://gist.github.com/idarek/324c6f693b34e1d365523113fce5a101
* Description: Load WooCommerce Square plugin only on /shop/ pages of WooCommerce. Remove from everything else. Put this file into (Must Use Plugins) wp-content/mu-plugins folder. Create mu-plugins if needed (ref. https://wordpress.org/support/article/must-use-plugins/). Based on https://lowgravity.pl/blog/quick-tip-how-to-disable-wp-plugin-on-certain-page/
* Author: Dariusz Więckiewicz
* Version: 1.0
* Author URI: https://dariusz.wieckiewicz.org/
*/
View linux_on_c100pa.md

Forked from kapilhp/linux_on_c100pa.md with my modifications as commentes on the main Gist.

An account of how to create a USB disk that will boot a Linux 4.19 kernel (based off Chrome OS' most recent working kernel) on an Asus C100PA with a Debian ("buster") root file system. This may also work on other veyron-* devices.

Setup USB Disk

In this first step we will create a Chrome OS GPT partition table on USB drive that looks like this:

 start size part contents