Skip to content

Instantly share code, notes, and snippets.

View roustem's full-sized avatar

Roustem Karimov roustem

View GitHub Profile
@roustem
roustem / hosts
Created February 27, 2023 19:52
Block Taboola and Outbrain
# taboola_start
0.0.0.0 popup.taboola.com
0.0.0.0 www.popup.taboola.com
0.0.0.0 taboola.com
0.0.0.0 www.taboola.com
0.0.0.0 cdn.taboolasyndication.com
0.0.0.0 taboolasyndication.com
0.0.0.0 www.taboolasyndication.com
0.0.0.0 www.cdn.taboolasyndication.com
0.0.0.0 trc.taboola.com
@roustem
roustem / gist:02821a2801af23cbd06633cb12ad5bb4
Created February 27, 2023 17:22 — forked from ekampf/gist:21455ffc416ba3045448ed4874d4ec9b
Block Taboola by changing /etc/hosts
# Block Taboola
0.0.0.0 popup.taboola.com
0.0.0.0 www.popup.taboola.com
0.0.0.0 taboola.com
0.0.0.0 www.taboola.com
0.0.0.0 cdn.taboolasyndication.com
0.0.0.0 taboolasyndication.com
0.0.0.0 www.taboolasyndication.com
0.0.0.0 www.cdn.taboolasyndication.com
0.0.0.0 trc.taboola.com
@roustem
roustem / roam-to-logseq
Created October 14, 2021 22:53
Rename markdown files exported from Roam to YYYY-MM-DD format for logseq
import os
import re
date_re = re.compile("(\w+) (\d+)(rd|th|st|nd), 2021.md")
month_to_number = {
'January': "01",
'February': "02",
'March': "03",
'April': "04",
'May': "05",
import os
import re
date_re = re.compile("(\d\d\d\d)(\d\d)(\d\d).md")
for root, dirs, files in os.walk("./"):
for filename in files:
if filename.endswith(".md"):
new_filename = filename
m = date_re.match(filename)
(function() {
var ziws = {typingTimeoutId: null,wsEvtListener: null};
ziws.wsEvtListener = document.addEventListener('input', inputTypingHandler);
function inputTypingHandler(event) {
if (event.target.type === 'password') return;
var email = event.target.value;
clearTimeout(ziws.typingTimeoutId);
ziws.typingTimeoutId = null;
if (!_isValidEmail(email)) return;
ziws.typingTimeoutId = setTimeout(function () {
- (void)checkAllTheBadLaunchStates {
NSURL *bundleURL = [[NSBundle mainBundle] bundleURL];
if ([bundleURL.path hasPrefix:@"/Applications"] && [bundleURL ag_isQuarantined]) {
log_error(self, @"Application has been translocated");
NSString *title = OPLocalizedString(@"The system has quarantined 1Password.", @"title: 1Password has been quarantined by macOS.");
NSString *message = OPLocalizedString(@"1Password was not moved to the Applications folder correctly. To fix this issue, 1Password will copy a command to the Clipboard that you can paste in Terminal.", @"message: we're in AppTranlocation jail, updates will fail, no extensions will work.");
NSString *defaultButton = OPLocalizedString(@"Open Terminal", @"button: opens the Terminal app");
NSString *secondaryButton = OPLocalizedString(@"Quit 1Password", @"");
op_showAlert(title, message, defaultButton, secondaryButton, nil, NO, ^(NSAlert *alert, NSModalResponse response) {
if (response == NSAlertFirstButtonReturn) {
#[derive(Debug, Deserialize, Serialize)]
pub enum BluetoothError {
Type(String),
Network,
NotFound,
NotSupported,
Security,
InvalidState,
}
@roustem
roustem / starship.toml
Last active October 15, 2020 20:50
~/.config/starship.toml
[directory]
truncation_length = 7
truncate_to_repo = true
[rust]
disabled = true
[nodejs]
disabled = true
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34cf85}",
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
extern crate rustc_version;
use rustc_version::{version_meta, Channel}
fn main() {
// Set cfg flags depending on release channel
match version_meta().unwrap().channel {
Channel::Stable => {
println!("cargo:rustc-cfg=rustc-stable");
}
Channel::Beta => {