Skip to content

Instantly share code, notes, and snippets.

@timkelty
timkelty / config.rb
Created January 11, 2012 15:28
Compass config.rb
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
@trongthanh
trongthanh / gist:2779392
Last active May 19, 2025 02:44
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@dubmun
dubmun / package.bat
Last active December 18, 2015 13:29 — forked from joshuaflanagan/package.bat
@ECHO OFF
SETLOCAL
SET VERSION=%1
SET NUGET=buildsupport\nuget.exe
FOR %%G IN (packaging\nuget\*.nuspec) DO (
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts
)
@waldyrious
waldyrious / Unicode pangram.md
Last active April 14, 2021 12:49
Rough Unicode coverage test for fonts

Unicode pangrams

This is a text consisting of a list of pangrams, sourced from the Wikipedia article, including characters from many common languages featuring true alphabets (mostly Latin-extended, Cyrillic and Greek). This is useful as an informal Unicode coverage tests for fonts, as well as a general generic prose test for fonts.

The quick brown fox jumps over the lazy dog.

@robvanoostenrijk
robvanoostenrijk / instructions.md
Created October 27, 2014 04:47
IKVM: Apache Fop

Place compiled Apache FOP in folder structure:###

  • \build\fop.jar
  • \lib\avalon-framework-4.2.0.jar
  • \lib\batik-all-trunk.jar
  • \lib\commons-io-1.3.1.jar
  • \lib\commons-logging-1.0.4.jar
  • \lib\fontbox-1.8.5.jar
  • \lib\fop-20140825.dll
  • \lib\serializer-2.7.0.jar
@paulirish
paulirish / what-forces-layout.md
Last active July 21, 2025 17:36
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@JPvRiel
JPvRiel / ubunut_network_manager_docker_dns_workaround.md
Last active March 14, 2025 14:17
Ubuntu, NetworkManager and Docker DNS workaround

Docker issues are frequently logged for DNS resolution in containers because it doens't inhert or get values for DNS from NetworkManager which leverages a built in dnsmasq to inteligently manage DNS.

Perminant workarround

sudo bash -c "echo listen-address=$(ip -4 addr show dev docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') > /etc/NetworkManager/dnsmasq.d/docker-bridge"
sudo systemctl reload NetworkManager
sudo bash -c 'echo -e "{\n\t\"dns\": [\"$(ip -4 addr show dev docker0 | grep -oP "(?<=inet\s)\d+(\.\d+){3}")\"]\n}" > /etc/docker/daemon.json'
sudo systemctl restart docker
@westc
westc / toggleFullscreen.js
Last active March 2, 2020 08:07
Toggles fullscreen mode by checking which features are available.
/**
* @license Copyright 2020 - Chris West - MIT Licensed
* @see https://www.yourjs.com/blog/snippet-toggle-fullscreen/
* Either toggles the fullscreen view on the document or a specified element or
* turns the fullscreen view on or off depending on the optional value passed
* in.
* @param opt_elem {Element|undefined|null}
* The element that should be targeted for fullscreen viewing.
* @param opt_value {?boolean=}
* Optional. If not given or undefined or null fullscreen will simply be
@igogrek
igogrek / How I stopped loving Angular.md
Last active July 7, 2025 18:44
How I stopped loving Angular

I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.

It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.

Today I refuse to use it in my next project myself.