Skip to content

Instantly share code, notes, and snippets.

use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
use std::rc::Rc;
/*
Types
*/
@thwarted
thwarted / FOR_EACH.cmacros.h
Created September 17, 2014 00:17
a FOR_EACH C Preprocessor macro that works under both GNU CC and Visual Studio 2013/MSVC
/* all this verbosity is required for this to work reliably and predictably
* on both GCC and MSVC
*/
/* because gcc cpp doesn't recursively expand macros, so a single CALLIT
* macro can't be used in all the FE_n macros below
*/
#define FE_CALLITn01(a,b) a b
#define FE_CALLITn02(a,b) a b
@gavinengel
gavinengel / magic-globals.js
Last active April 3, 2023 10:56
"Magic Globals" for node.js
// sets globals:
// __stack,
// __line,
// __file,
// __function,
// __ext,
// __base
// we already have these:
// __filename which gives as an example: /Users/mjr/example.js
@gg7
gg7 / chromium-bookmark-folders.patch
Last active April 4, 2025 14:33
Increase the number of recently shown folders (5) in chromium when adding/modifying a bookmark
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
index 88df062..5adbc2e 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
@@ -14,7 +14,7 @@
namespace {
// Max number of most recently used folders.
-const size_t kMaxMRUFolders = 5;
+const size_t kMaxMRUFolders = 20;
/*
* Copyright (c) 2013, Daniel Park
* All rights reserved.
*
* Permission to modify and redistribute this software is granted to
* anyone provided the above copyright notice, this condition and the
* following disclaimer are retained.
*
* This software is provided "as is", without and express or implied
* warranty. In no event shall the author be liable for damages arising