Skip to content

Instantly share code, notes, and snippets.

View htr3n's full-sized avatar

Alex T. htr3n

View GitHub Profile
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active March 23, 2024 16:13
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active March 25, 2024 22:48
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@ctechols
ctechols / compinit.zsh
Last active April 19, 2024 23:44
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@fabricelejeune
fabricelejeune / Efficient font stack with Sass.md
Last active March 16, 2023 23:52
Efficient font stack with Sass

Efficient font stack with Sass

The strength of Sass is the mixins and functions. Being able to automate many of the repetitive coding for CSS is both amazing in building and maintaining a clean and efficient code. I often find many developers creating complex systems for simple tasks, such as managing a font stack. This can be tedious to set up and employ. In this article, I will explain how I automate this system.

The font stack is one of those problems which are often solved by simple variables. In this instance, it makes a lot of sense and is easy enough to work with. But when you work with our (beloved) designers from Dogstudio, you can be sure of having to use lot of font variants. It quickly happens that I do not remember all the properties of each variants. And when I say "use lot of font variants", I mean at least 15 in most cases.

Sass maps to the rescue

Instead of simply define variables, I will ceate a font stack map and a mixin to use the map easily.

@blowsie
blowsie / glyphicon_font-awesome_convert.scss
Last active March 5, 2024 13:27
Map glyphicon icons to font-awesome
$fa-font-path: "~font-awesome/fonts";
@import '~font-awesome/scss/font-awesome';
.glyphicon {
@extend .fa;
&.glyphicon-asterisk {
@extend .fa-asterisk;
}
&.glyphicon-plus {
@extend .fa-plus;
@mixin for-phone-only {
@media (max-width: 599px) { @content; }
}
@mixin for-tablet-portrait-up {
@media (min-width: 600px) { @content; }
}
@mixin for-tablet-landscape-up {
@media (min-width: 900px) { @content; }
}
@mixin for-desktop-up {
@lavaldi
lavaldi / tweaks-sublime-italic-operator-mono.md
Created March 16, 2017 02:02
Operator Mono & Sublime Text 3 themes
  1. Install Package Resource Viewer.
  2. In package control window select ‘Package Resource Viewer: Open Resource’.
  3. Scroll down until you find the option: ‘Color Scheme — Default’ (or your theme with color scheme .tmTheme) and select it.
  4. Add the following
<!-- Operator Tweaks -->
  <dict>
    <key>name</key>
 Italic HTML attribute names