Skip to content

Instantly share code, notes, and snippets.

View levitation's full-sized avatar
💭
I may be slow to respond.

Roland Pihlakas levitation

💭
I may be slow to respond.
View GitHub Profile
@TheKrush
TheKrush / VSBuildPriority.reg
Last active July 13, 2023 16:48
Lowers the priority of cpu / io for the processes used by Visual Studio during builds (to prevent the machine from freezing up).
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cl.exe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cl.exe\PerfOptions]
"CpuPriorityClass"=dword:00000005
"IoPriority"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\link.exe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\link.exe\PerfOptions]
"CpuPriorityClass"=dword:00000005
@nphmuller
nphmuller / MyDbContext.cs
Last active February 1, 2024 23:20
CombineQueryFilers
public class MyDbContext : DbContext
{
private ITenantIdLocator tenantIdLocator;
public MyDbContext(ITenantIdLocator tenantIdLocator)
{
if (tenantIdLocator == null) throw new ArgumentNullException(nameof(tenantIdLocator));
this.tenantId = tenantIdLocator.GetTenantId();
}
@thewheat
thewheat / intercom_javascript_attributes.md
Last active May 11, 2021 15:13
Attributes for Intercom's client side Javascript integration used when installing the messenger https://developers.intercom.com/docs/js-installation

Javascript Installation Attributes

  • Intercom can be initialised with various ways For visitors
window.intercomSettings = { 
  app_id: YOUR_APP_ID
}

For Logged in users

@langusta
langusta / irl_state_transitions.py
Last active April 17, 2018 18:40
IRL gridworlds level 0 state transition matrix
#
# REQUIRES CHANGES IN THE SideEffectsSokobanEnvironment CLASS
# SO THAT sokoban_game(level=0, game_art=GAME_ART) WORKS !!!
#
import numpy as np
from ai_safety_gridworlds.environments.side_effects_sokoban import SideEffectsSokobanEnvironment as sokoban_game
# %% masks
@trietptm
trietptm / enable_bottom-up_ASLR.reg
Created December 11, 2017 12:39 — forked from wdormann/enable_bottom-up_ASLR.reg
Enable both Mandatory ASLR *and* Bottom-up ASLR system-wide
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel]
"MitigationOptions"=hex:00,01,01,00,00,00,00,00,00,00,00,00,00,00,00,00
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active May 19, 2024 00:32
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@tanaikech
tanaikech / submit.md
Last active August 16, 2023 23:30
Selecting Files in Google Drive using Select Box for Google Apps Script

This is a sample script for selecting files in Google Drive using HTML select box for Google Apps Script.

Feature

Feature of this sample.

  • It is a simple and space saving.
  • When the folder is selected, the files in the folder are shown.
  • When the file is selected, the ID of file is retrieved. Users can use this ID at GAS.
  • When a folder is opened, all files in the folder are cached. By this, the second access of the folder is faster.
  • It doesn't retrieve all files in Google Drive at once, so the read of files from Google Drive becomes the minimum necessary.
@paumoreno
paumoreno / README.md
Last active June 8, 2022 04:41
Extract all messages from a Vue.js with vue-i18n app, using gettext-extractor.

This script uses the great message extraction library gettext-extractor by lukasgeiter.

The script assumes that the location of the source files is ./src. It parses both .js and .vue files. It writes the PO template file in ./i18n/messages.pot.

Some things to note:

  • It assumes that interpolations in the templates use the delimieters {{}} (it is the most commmon case).
  • It assumes that both the template and the script sections of the .vue single file components are defined inline, and not referenced by a src attribue (it is the most common case).
  • Expressions to extract are hardcoded. Currently they are ['$t', '[this].$t', 'i18n.t'].
anonymous
anonymous / -
Created August 1, 2017 10:14
diff --git a/Vagrantfile b/Vagrantfile
index fd3f2a9..4b764b3 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -43,6 +43,7 @@ Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |vb|
# Use linked clones to preserve disk space.
vb.linked_clone = true if Vagrant::VERSION =~ /^1.8/
+ vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
end
@alexandrnikitin
alexandrnikitin / AhoCorasickTree.cs
Created April 14, 2017 07:44
Aho-Corasick C# implementation
using System.Collections.Generic;
using System.Linq;
namespace AhoCorasickTree
{
public class AhoCorasickTree
{
internal AhoCorasickTreeNode Root { get; set; }
public AhoCorasickTree(IEnumerable<string> keywords)