Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
🛹

Łukasz Korecki lukaszkorecki

🌴
🛹
View GitHub Profile
View _info
Autor designu: ^ludwik http://ludwik.org/blipapp-jest-jakis-chetny-developer/
Przeportował: ^ravicious
Poprawił: ^plugawy (fix dla licznika blipnięć + pozycja textarea)
# Instalacja
- kliknij na przycisk `raw` przy panelu dla pliku `deskblip.css`
- skopiuj całą zawartość i przejdź do ustawień deskBlipa
- tam wklej skopiowaną zawartość i kliknij przycisk `Zapisz ustawienia`
# Podgląd
View winmaximize.vim
" Maximize your (g|mac)vim window
" Put this in your .(g)vimrc
" :w | so %
" :WinMax (can be whatever you like) - just change the alias in the last line (own functions need to start with capital letter)
function! s:MAX()
set lines=999
set columns=999
endfunction
command! -bar -narg=0 WinMax call s:MAX()
View listfunctions.vim
" List all functions in current file and open jump list
" put this in your .vimrc
" added 'j' modifier so that vimgrep doesn't jump to the first result
function! s:ListFunctions()
vimgrep /function/j %
copen
endfunction
command! -bar -narg=0 LS call s:ListFunctions()
View fix.js
// IE Fix for Adobe's FAVideo Player
FAVideo.prototype.getElement = function(id) {
var elem;
if (navigator.appName.indexOf("Microsoft") != -1) {
window[id] = document.getElementById(id);
return window[id]
} else {
if (document[id]) {
elem = document[id];
} else {
View gist:223709
How to disable Same Origin Policy in:
1) Firefox:
about:config -> security.fileuri.strict_origin_policy -> false
2) Chrome:
run with command line switch: --disable-web-security
View js_function_list.vim
" list all methods/functions in object literal in Javascript
" i.e. var obj = {
" testF : function() { alert('yo!'); },
" el : 0,
" tesf2 :function (elo) { console.dir(elo); }
" };
" one thing though:
" function definition has to have "{" on the same line as "function" keyword
lvimgrep /\w*:.*function.*{/ %
View helper_Example.erb
<p>WaplHelper examples - check out the test file for more</p>
<%= chars('dupa') %>
<%= chars('[b]elo[/b]',{ :attributes =>{ 'make_safe'=>'false' }, :cell=>{ "class" => "test"}, :row=>{:id=>'duzy'}}) %>
<%= chars('[b]elo[/b]',{ :attributes =>{ 'make_safe'=>'false' }}) %>
<%= external_image('http://wapl.info/img/header_wapple.png') %>
<%= external_image('http://wapl.info/img/header_wapple.png', { :attributes=>{ :file_type => "png", :scale =>"150"} }) %>
<%= external_image('http://wapl.info/img/header_wapple.png' , { :children => { :safe_mode => "1"}}) %>
<%= external_image('http://wapl.info/img/header_wapple.png') %>
<%= external_link("Google", 'http://google.com') %>
View fix.sh
# fix file permissions across net shares and stuff
# typical web-dev type permissions,
# however you might adjust it accordingly
# fix files
sudo find -name '*' -type 'f' -exec chmod 664 {} \;
#fix directories
sudo find -name '*' -type 'd' -exec chmod 775 {} \;
View tab.el
; This seems to do the trick:
; - displays 4 spaces (or 2) as 2-space indent
; - inserts 2 spaces and indents by two
; I know it's weird ;-)
; indent settings
(setq-default c-basic-offset 2)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(custom-set-variables
View color-theme-loader.el
; easy way: (put this into your .emacs)
; locations
(setq emacsdir "~/.emacs.d") ; or wherever you keep it
(setq plugins-dir (concat emacsdir "/plugins")) ; ditto
(setq themes-dir (concat plugins-dir "/themes")) ; see above
; COLORZ
(defun color-theme-loader (theme-name)