Find attribute_id
SELECT * FROM eav_attribute where attribute_code = 'is_anchor'
Update all of them with anchor_id from above (usually is ID 51)
UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
### Testing if the client is a mobile or a desktop. | |
### The selection is based on the usual UA strings for desktop browsers. | |
## Testing a user agent using a method that reverts the logic of the | |
## UA detection. Inspired by notnotmobile.appspot.com. | |
map $http_user_agent $is_desktop { | |
default 0; | |
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule | |
~*spider|crawl|slurp|bot 1; # bots | |
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes |
This playbook has been removed as it is now very outdated. |
sort -u -t, -k1,1 file
- Unique in column
u
for uniquet
, so comma is the delimiterk1,1
for the key field 1sed '/^$/d' myFile
- remove blank lines from a filefind ~/ -type d -maxdepth 3 -exec du -hs '{}' \;
- display usage for all folders in a directorycurl http://requestb.in/10wkj9v1 -x http://183.220.199.76:8123
- proxy testingcurl -o /dev/null -s -w "Connect: %{time_connect} \nTime to first byte: %{time_starttransfer}\nTotal time: %{time_total} \n" <url>
- Webpage perf stats using curlnc -z -v 192.168.15.196 1-1000
import java.text.*; | |
import java.io.*; | |
import java.util.*; | |
String filename = "oprosnik_" + vars.get("fileNum") + ".csv"; | |
ArrayList strList = new ArrayList(); | |
try { | |
File file = new File(filename); |
All stats can be find here
# Summary | |
A few notes I took to see if I could use MacOS as Hypevirsor in a similar fashion to Linux | |
I wanted to see how few addons were needed instead of using Parallels, Virtual Box, VM Fsion etc. | |
The idea is to use QEMU, Hypervisor Framework (https://developer.apple.com/documentation/hypervisor) and some custom host networking. | |
# Installations | |
brew install qemu (For controlling Hypervisor Framework) | |
brew install cdrtools (For making cloud init iso's) | |
http://tuntaposx.sourceforge.net/download.xhtml (For customer tap based networking) |
# find the kube node of the running pod, appear next to hostIP, and note containerID hash | |
kubectl get pod mypod -o json | |
# -> save hostIP | |
# -> save containerID | |
# connect to the node and find the pods unique network interface index inside it's container | |
docker exec containerID /bin/bash -c 'cat /sys/class/net/eth0/iflink' | |
# -> returns index | |
# locate the interface of the node |