Skip to content

Instantly share code, notes, and snippets.

@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@jonsuh
jonsuh / js-ajax-php-json-return.html
Last active September 17, 2022 02:57
jQuery AJAX Call to PHP Script with JSON Return
<div class="the-return">
[HTML is replaced when successful.]
</div>
@henryiii
henryiii / git-all.bash
Last active April 29, 2023 15:13
Fast repository status for repos in git folder
#!/usr/bin/env bash
# This script should be named (or symbolically linked) as git-all so that
# it can be run as a git command (if it is in the path). The repo location should
# be set in REPOLOC. Can be relative if this script is also in a repo!
# Standard bash stuff to get the current directory
unset CDPATH
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
@micclly
micclly / listup-terminal-data-path.sh
Last active December 19, 2017 11:25
This is a script to list up all terminal data path of MetaTrader4 build 600 or later
#!/bin/bash
find $(cygpath $APPDATA)/Roaming/MetaQuotes/Terminal/ -mindepth 2 -maxdepth 2 -name origin.txt -exec sh -c 'echo {} && cat {} && echo' \;
@micclly
micclly / make-symlinks-to-termina-data-path.sh
Created February 18, 2014 01:56
This is a script to make symbolic links to all terminal data path of MetaTrader4 build 600 or later
@micclly
micclly / Period_Converter_OptMOD.mq4
Last active June 19, 2019 06:04
Period_Converter_OptMOD.mq4 (build 6xx supported version)
//+------------------------------------------------------------------+
//| Period_Converter_Opt.mq4|
//| Copyright (c)2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//| Ver.1.6 Modified by micclly|
//| Ver.1.5 Modified by fai |
//| Modified by wfy05@talkforex based on Period_Converter|
//| http://www.talkforex.com |
//+------------------------------------------------------------------+
#property copyright "wfy05@talkforex.com"
@srid99
srid99 / install-intellij.sh
Created June 9, 2014 15:14
A bash script to create and install a desktop entry for intellij ultimate edition in (mostly) any linux distro
#!/usr/bin/env bash
# Run this script from your '/.../intellij-location/bin' directory.
# Application name
APPLICATION=intellij-idea
# Application path
APPLICATION_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
@ruario
ruario / manual-install-of-opera.md
Last active September 7, 2018 11:49
How to install Opera developer for Linux on distributions other than Debian, Ubuntu or derivatives
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@kaesetoast
kaesetoast / fix-duplicate icon
Created November 18, 2014 10:33
Fix duplicate Chrome icon in Plank
sudo sed -i -r 's/(\[.+\])$/\1\nStartupWMClass=Google-chrome-stable/g' /usr/share/applications/google-chrome.desktop