Skip to content

Instantly share code, notes, and snippets.

@morsdyce
morsdyce / 01.configure
Created May 13, 2014 21:38 — forked from sanusart/01.configure
gist with files more than 1M of size #big
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
@morsdyce
morsdyce / .vimrc
Created June 10, 2014 16:20 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@morsdyce
morsdyce / newFile1.txt
Created June 15, 2014 14:29 — forked from elentok/gist:3193556
Vim Hebrew edit mode
imap <f2> <c-o>:call ToggleHebrew()<cr>
map <f2> :call ToggleHebrew()<cr>
func! ToggleHebrew()
if &rl
set norl
set keymap=
else
set rl
set keymap=hebrew

Při prvním pokusu na mě ufw při pokusu o povolení vyplivl hlášku:

root@vps:~# ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
ERROR: problem running ufw-init
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/2.6.32-042stab093.4/modules.dep.bin'
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/2.6.32-042stab093.4/modules.dep.bin'
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/2.6.32-042stab093.4/modules.dep.bin'
iptables-restore: line 4 failed
iptables-restore: line 77 failed
@morsdyce
morsdyce / snippets.md
Last active August 29, 2015 14:17 — forked from sanusart/snippets.md
shell snippets and functions #shell #bash #sh

Inform with message

Use: message "Informing you about something"

message () {
    printf "\n";
    printf "\e[30;48;5;82m ${1} \e[0m "
    printf "\n";
}
@morsdyce
morsdyce / preserving-history.md
Last active August 29, 2015 14:19 — forked from dannyroberts/preserving-history.md
move and rename directories in git while preserving history #git

Did you know...

...that git lets you move and rename whole directories while preserving the git history of those files?

If you run

git read-tree --prefix=$NEW_PATH -u master:$OLD_PATH
rm -rf $OLD_PATH
# ...you probably want to change some imports...
git commit -m $MESSAGE
@morsdyce
morsdyce / gist-reveal.it-slides.html
Last active August 29, 2015 14:25 — forked from ryanj/gist-reveal.it-slides.html
Use Docker, gist.github.com, and Reveal.js to produce themed slideshow presentations for conferences and / or hackathons
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<p class='fragment'><small><a class='fragment' href='http://github.com/ryanj/gist-reveal.it'>github.com/ryanj/gist-reveal.it</a>
<br/> <a class='fragment' href='https://registry.hub.docker.com/u/ryanj/gist-reveal.it/'>registry.hub.docker.com/u/ryanj/gist-reveal.it</a></small></p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
<h2>Embed</h2>
<iframe webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" sandbox="allow-forms allow-scripts allow-popups allow-same-origin allow-pointer-lock" data-src="https://regex101.com/r/sB4uZ3/1"></iframe>
@morsdyce
morsdyce / what-forces-layout.md
Created September 28, 2015 10:42 — forked from paulirish/what-forces-layout.md
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.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
var webpackConfig = {
plugins: [
// Plugin to show any webpack warnings and prevent tests from running
function () {
this.plugin("done", function (stats) {
if (stats.compilation.warnings.length) {
// Log each of the warnings
stats.compilation.warnings.forEach(function (warning) {
console.log(warning.message || warning);
});