Skip to content

Instantly share code, notes, and snippets.

@dolzenko
dolzenko / tinymce-content.css
Created July 14, 2009 12:23
Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset
/* Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset.
* Added along with YUI CSS reset to the content_css option of TinyMCE and to the page on which TinyMCE content should be displayed.
*/
/* This part is based on tinymce-3.2.1.1\jscripts\tiny_mce\themes\advanced\skins\default\content.css */
.mceContentBody,
.mceContentBody td,
.mceContentBody pre
{
@lusis
lusis / A.md
Created June 1, 2012 04:45
dirt simple basic config for talking to an external elasticsearch server

The thing that trips most people up is that the parameters to the web cli (--backend elasticsearch://blah:9300/blah) do NOT set the output destination.

The web app is its own process with its own args. It knows nothing about the agent config file.

Remember that you could simply use the same jar like so:

java -jar logstash.jar web --backend elasticsearch://elasticsearch:9300/clustername

and run the web interface without the agent process.

@mahmoudimus
mahmoudimus / cron_helper.sh
Created October 17, 2015 13:11 — forked from liquidgecka/cron_helper.sh
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@yasar11732
yasar11732 / theme.html
Last active December 11, 2015 21:09 — forked from soemarko/theme.html
<!-- Aşağıdaki satırları </head> tagından önce, temanızın html dosyasına ekleyin -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Kullanımı: sayfanıza şunu ekleyin <div class="gist">[gist URL]</div>
Örnek: <div class="gist">https://gist.github.com/1395926</div>
-->
@emre
emre / goto.py
Last active December 14, 2015 04:29
cok fazla sunucu uzerinde calisinca cok fazla alias yazmak zorunda kalabiliyorsunuz ssh baglantilari icin. ssh auth konusunu password olmadan hallediyorsaniz goto makine1, goto solr_server, goto X seklinde ip adresleriyle ugrasmadan baglanti yapmanizi kolaylastiran ufak bir script.
#!/usr/bin/python
import os
import sys
try:
import simplejson as json
except ImportError:
import json
@teaholiday89
teaholiday89 / fetch.stuff
Created April 2, 2013 07:48
Fetch Libs
{
"files":
{
"angular.js": "https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js",
"dropdown.js": "https://raw.github.com/enyo/dropzone/master/downloads/dropzone.js",
"holder.js": "https://raw.github.com/imsky/holder/master/holder.js",
"howler.js": "https://raw.github.com/goldfire/howler.js/master/howler.min.js",
"jKit.js": "https://raw.github.com/FrediBach/jQuery-jKit/master/jquery-1.9.1.min.js",
"jq++": "http://jquerypp.com/downloads/jquerypp-1.0.1.zip",
"jquery.js": "http://code.jquery.com/jquery.min.js",
anonymous
anonymous / README.markdown
Created April 8, 2013 23:18

Gist: The Script

Works great with Gist: The Website.

Installation

homebrew:

@umpirsky
umpirsky / kill-me-please
Created April 18, 2013 20:29
After running this recursive script on Linux, you are screwed!
#!/bin/bash
./kill-me-please
@hlee
hlee / git_report
Created April 19, 2013 23:18
git report
#! /usr/bin/perl -w
use strict;
my $since;
if ($ARGV[0]) {
$since = $ARGV[0];
} else {
$since = "1 week ago";
}
@aTei
aTei / jquery_plugin_template.coffee
Last active December 19, 2015 02:28
jQuery plugin as CoffeeScript class template
class PluginClass
constructor: (@target) ->
_this = @ # to access Class inside @target.each and not modificate @ inside @target.each
eventData = {_class: _this} # to access Class inside event handlers
@target.each ->
self = $(@)
self.on 'click', eventData, _this.submitHandler
submitHandler: (e)->
_this = e.data._classs
e.preventDefault()