Skip to content

Instantly share code, notes, and snippets.

View AnwarShah's full-sized avatar

Anwar AnwarShah

View GitHub Profile
@AnwarShah
AnwarShah / 99-replace-thin.conf
Created February 25, 2018 04:02
Replace thin fonts with ultralight using fontconfig
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- replace thin fonts for fira with ultralight, since thin is too light -->
<match target="font">
<test name="family" compare="contains">
<string>Fira Sans</string>
</test>
<test name="weight" compare="less_eq">
@thebinarypenguin
thebinarypenguin / sublime-text-2.desktop
Created June 21, 2012 04:26
A desktop application launcher for Sublime Text 2
[Desktop Entry]
Type=Application
Terminal=false
StartupNotify=true
Name=Sublime Text 2
Name[en_US]=Sublime Text 2
GenericName=Text Editor
GenericName[en_US]=Text Editor
Comment=Edit text files
Comment[en_US]=Edit text files
@AnwarShah
AnwarShah / favoriate-gnome-shell-extensions
Last active February 28, 2020 13:31
My favorite gnome shell extensions
Clipboard indicator - https://extensions.gnome.org/extension/779/clipboard-indicator/
CustomCorner - https://extensions.gnome.org/extension/1037/customcorner/
Dash to Dock - https://extensions.gnome.org/extension/307/dash-to-dock/
Dash to Panel - https://extensions.gnome.org/extension/1160/dash-to-panel/
Do Not Disturb Button - https://extensions.gnome.org/extension/964/do-not-disturb-button/
Extensions - https://extensions.gnome.org/extension/1036/extensions/
gistnotes - https://extensions.gnome.org/extension/917/gistnotes/
Hide Top Bar - https://extensions.gnome.org/extension/545/hide-top-bar/
Gnome-Prefs Button - https://extensions.gnome.org/extension/1054/gnome-prefs-button/
Impatience - https://extensions.gnome.org/extension/277/impatience/
@chris-jamieson
chris-jamieson / setup.md
Created April 19, 2016 15:43
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
  • (optional) wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png then sudo cp franz-icon.png /opt/franz
  • (optional) sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
@pandasauce
pandasauce / radiff2.log
Last active September 22, 2020 14:22
Chrome 75.0.3770.142 font rendering fix
# 75.0.3770.142
0x04b58615 7626 => 9090 0x04b58615
0x04b5861d 31c0488945 => 9090909090 0x04b5861d
Due to a beautiful bug in Chromium, it turns out you don't need this binary patch and can **enable** subpixel positioning by asking Chrome **to disable it**: https://bugs.chromium.org/p/chromium/issues/detail?id=824153#c39
Needless to say, I won't be maintaining this gist any longer.
@larsenwork
larsenwork / MonoidAtom.scss
Last active July 15, 2021 14:47
The code below enables contextual alternates and ligatures but disables them on your `cursor-line` so you don't sacrifice "editability".
* {
-webkit-font-smoothing: antialiased;
-webkit-font-feature-settings: "liga" on, "calt" on;
}
atom-text-editor .cursor-line {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
@lou
lou / base_uploader.rb
Last active March 22, 2022 11:59
Rails - Carrierwave validation of image size
class BaseUploader < CarrierWave::Uploader::Base
attr_reader :width, :height
before :cache, :capture_size
...
# for image size validation
# fetching dimensions in uploader, validating it in model
def capture_size(file)
if version_name.blank? # Only do this once, to the original version
@pudquick
pudquick / parse_pbzx2.py
Created April 8, 2015 05:27
A pbzx stream decoder for the format found within Yosemite package payloads.
# v2 pbzx stream handler
# My personal writeup on the differences here: https://gist.github.com/pudquick/29fcfe09c326a9b96cf5
#
# Pure python reimplementation of .cpio.xz content extraction from pbzx file payload originally here:
# http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html
#
# Cleaned up C version (as the basis for my code) here, thanks to Pepijn Bruienne / @bruienne
# https://gist.github.com/bruienne/029494bbcfb358098b41
import struct, sys
@cho2
cho2 / google-chrome-flatpak
Last active December 18, 2022 14:26
Google Chrome Flatpak
//eos3
wget https://origin.ostree.endlessm.com/keys/eos-flatpak-keyring.gpg
flatpak remote-add --gpg-import=eos-flatpak-keyring.gpg eos-apps https://ostree.endlessm.com/ostree/eos-apps
flatpak remote-add --gpg-import=eos-flatpak-keyring.gpg eos-sdk https://ostree.endlessm.com/ostree/eos-sdk
flatpak install eos-apps com.google.Chrome
git clone git@github.com:endlessm/eos-google-chrome-app.git
cd eos-google-chrome-app
chmod +x eos-google-chrome-app
./eos-google-chrome-app
@cwchien
cwchien / java-7-sun.jinfo
Last active January 6, 2023 19:43
jdk7 jinfo file modified from /usr/lib/jvm/.java-6-sun.jinfo on Debian GNU/Linux (amd64 version)
name=java-7-sun-1.7.0.13
alias=java-7-sun
priority=73
section=non-free
jre ControlPanel /usr/lib/jvm/java-7-sun/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-7-sun/jre/bin/java
jre java_vm /usr/lib/jvm/java-7-sun/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-7-sun/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-7-sun/jre/bin/jcontrol