This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready -> | |
$('.wym_tools_image a').click (e)-> | |
e.stopImmediatePropagation() | |
e.preventDefault() | |
id = $('.wym_iframe').find('iframe:visible').attr('id').slice(-1) | |
url = prompt('Insert external image link') | |
img = new Image() | |
img.src = url | |
alt = prompt('Insert alternative text for the image') | |
wym = jQuery.wymeditors(id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AdminCustomersController extends AdminCustomersControllerCore | |
{ | |
public function afterAdd($customer) | |
{ | |
require_once _PS_MODULE_DIR_.'newsletterplus/newsletterplus.php'; | |
$newsletterplus = new Newsletterplus(); | |
$newsletterplus->hookActionCustomerAccountAdd(array( | |
'_POST' => $_POST, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xml.instruct! | |
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do | |
@locales.each do |locale| | |
::I18n.locale = locale | |
::Refinery::Page.live.in_menu.includes(:parts).each do |page| | |
# exclude sites that are external to our own domain. | |
page_url = if page.url.is_a?(Hash) | |
# This is how most pages work without being overriden by link_url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put in /etc/gdm3/Init/Default or ~/.xprofile | |
cvt 1280 720 60 | |
xrandr --newmode "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync | |
xrandr --addmode VGA-0 1280x720_60.00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rails() { | |
if [ "$1" = "start" ]; then | |
if [ "$2" = "" ]; then | |
RENV="development" | |
else | |
RENV="$2" | |
fi | |
rails server -d -e "$RENV" | |
return 0 | |
elif [ "$1" = "stop" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# merge2ass.sh - script for merging two text-subtitles into an ass subtitle file | |
# version 0.9b, 02-feb-2013 | |
# comments/criticism/praise to jose1711-gmail-com | |
# dependencies: mplayer (if your subtitle files need to be converted to srt), gnu utils | |
# thanks to: | |
# - d.watzke for comments | |
# - belisarivs for testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ x = x${2} ]; then | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
STORY_NUMBER=$(echo $BRANCH_NAME | sed -n 's/.*-\([0-9]\)/\1/p') | |
if [ x != x${STORY_NUMBER} ]; then | |
sed -i.back "1s/^/\n\n[#$STORY_NUMBER]/" "$1" | |
fi | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function epub() { | |
tags="$@" | |
if [ x = x${tags} ]; then | |
filename=$(date -I)_feeds | |
else | |
filename=$(date -I)_${tags// /_}_feeds | |
fi | |
ebook-convert ~/projects/recipes/newsbeuter/newsbeuter.recipe $filename.epub --tags="${tags// /,}" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Measuring objects created by gems in groups [:default, "production"] | |
Total allocated: 11269732 bytes (61895 objects) | |
Total retained: 4477284 bytes (11381 objects) | |
allocated memory by gem | |
[37m-----------------------------------[0m | |
6256569 axlsx-2.0.0 | |
3278098 nokogiri-1.6.6.2 | |
1100457 rubyzip-0.9.9 | |
517043 htmlentities-4.3.4 |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"label":"","duration":18592.858384999912,"markers":[{"end":1596.5449410000583,"endStack":null,"isOffMainThread":false,"name":"nsCycleCollector::ForgetSkippable","processType":0,"stack":null,"start":1595.9524039999815},{"end":1621.1153550000163,"endStack":null,"eventPhase":2,"isOffMainThread":false,"name":"DOMEvent","processType":0,"stack":null,"start":1620.9124489999376,"type":"mousemove"},{"causeName":"EventListener.handleEvent","end":1621.1104840000626,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":0,"stack":1,"start":1620.935107999947},{"causeName":"CC_WAITING","end":1674.7230330000166,"endStack":null,"isOffMainThread":false,"name":"MinorGC","processType":0,"stack":null,"start":1673.6202110000886},{"causeName":"REFRESH_FRAME","end":1712.1202819999307,"endStack":null,"isOffMainThread":false,"name":"MinorGC","processType":0,"stack":null,"start":1711.7321020000381},{"causeName":"REFRESH_FRAME","end":1811.9146579999942,"endStack":null,"isOffMainThread":false,"name":"MinorGC","proces |
OlderNewer