This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
namespace AhoCorasickTree | |
{ | |
public class AhoCorasickTree | |
{ | |
internal AhoCorasickTreeNode Root { get; set; } | |
public AhoCorasickTree(IEnumerable<string> keywords) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove untracked files, including directories (-d) and files ignored by git (-x) to force (-f) to exclude files (-e) | |
git clean -n -d -x -e ".idea" | |
// compare content of moved folder | |
git diff --ignore-space-change \ | |
HEAD:source/oldDir/someDir \ | |
HEAD~1:source/newDir/someDir/ | |
// delete merged local branches (use "| xargs -n 1 echo" if not sure) | |
git branch --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git branch -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find used space | |
df -h | |
du -h / | grep '[0-9\.]\+G' | |
du -h --max-depth=1 | sort -hr | |
/bin/treesize | |
#/bin/sh | |
du -k --max-depth=1 | sort -nr | awk ' | |
BEGIN { | |
split("KB,MB,GB,TB", Units, ","); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Xms196G | |
-Xmx196G | |
-XX:+UseG1GC | |
-XX:+ParallelRefProcEnabled | |
-XX:MetaspaceSize=1024M | |
-XX:MaxMetaspaceFreeRatio=90 | |
-Xloggc:/var/log/service/gc.log | |
-XX:+PrintGCDetails | |
-XX:+PrintGCDateStamps | |
-XX:+PrintReferenceGC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm | |
sudo yum --disablerepo="*" --enablerepo="elrepo-kernel" list available | |
sudo yum --enablerepo=elrepo-kernel install kernel-ml | |
awk -F\' /^menuentry/{print\$2} /etc/grub2-efi.cfg | |
sudo grub2-set-default 0 | |
sudo grub2-mkconfig -o /boot/grub2/grub.cfg | |
shutdown -r now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
[StructLayout(LayoutKind.Sequential, Pack = 4)] | |
private struct _GROUP_AFFINITY | |
{ | |
public UIntPtr Mask; | |
[MarshalAs(UnmanagedType.U2)] | |
public ushort Group; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install -y systemtap systemtap-runtime | |
sudo yum install kernel-debuginfo kernel-debuginfo-common | |
sudo yum install yum-utils | |
debuginfo-install kernel-3.10.0-514.21.2.el7.x86_64 | |
sudo yum install -y kernel-devel-$(uname -r) | |
sudo yum install -y kernel-debuginfo-$(uname -r) | |
sudo yum install -y kernel-debuginfo-common-$(uname -m)-$(uname -r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud beta compute instances create colab-1-vm \ | |
--machine-type=e2-highmem-4 \ | |
--provisioning-model=SPOT \ | |
--boot-disk-size=200GB \ | |
--boot-disk-type=pd-balanced \ | |
--instance-termination-action=DELETE \ | |
--image=https://www.googleapis.com/compute/v1/projects/colab-marketplace-image-public/global/images/colab-mp-20220110 \ | |
--network=https://www.googleapis.com/compute/v1/projects/<INSERT_PROJECT_ID>/global/networks/default \ | |
--subnet=https://www.googleapis.com/compute/v1/projects/<INSERT_PROJECT_ID>/regions/<INSERT_REGION>/subnetworks/default \ | |
--no-restart-on-failure \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Adform.AdServing.AhoCorasickTree.Sandbox.V7g | |
{ | |
public class AhoCorasickTree | |
{ | |
internal AhoCorasickTreeNode Root { get; set; } | |
public AhoCorasickTree(IEnumerable<string> keywords) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disable power saving on CentOS 7 | |
grep -E '^model name|^cpu MHz' /proc/cpuinfo | |
pgrep -lf ondemand | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $CPUFREQ ] || continue; echo -n performance > $CPUFREQ; done | |
service cpuspeed stop | |
lsmod | grep ondemand | |
grep -E '^model name|^cpu MHz' /proc/cpuinfo |
NewerOlder