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
<html><head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
function tally (selector) { | |
$(selector).each(function () { | |
var total = 0, | |
column = $(this).siblings(selector).andSelf().index(this); | |
$(this).parents().prevUntil(':has(' + selector + ')').each(function () { |
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 uniq(a) { | |
return a.sort().filter(function(v, i, a) { | |
return !i || v != a[i - 1]; | |
}); | |
} | |
Got a smart way | |
function uniq(arr) { | |
return arr.filter((v,i,a) => a.indexOf(v)===i); |
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
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CoffeeScript: source.coffee |
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
/** | |
* This will open new fiverr window every 10 minutes | |
* and close that window after 8 minutes | |
*/ | |
var newWindow, nthTime = 0; | |
setInterval(() => { | |
newWindow = window.open('http://www.fiverr.com'); | |
console.log('Refreshed ' + (++nthTime) + ' time'); | |
setTimeout(() => { newWindow.close() }, 1000 * 60 * 8); |
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
Step 1: | |
Go to: C:\Windows\System32\Drivers\etc\hosts | |
And add this to the bottom of the file: | |
============= | |
127.0.0.1 your.domain.com | |
============= | |
Step 2: | |
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf |
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 | |
date_default_timezone_set('GMT'); | |
//1- file we want to serve : | |
$data_file = "/home/f0rud/Aalto Talk with Linus Torvalds [Full-length].mp4"; | |
$data_size = filesize($data_file); //Size is not zero base | |
$mime = 'application/otect-stream'; //Mime type of file. to begin download its better to use this. | |
$filename = basename($data_file); //Name of file, no path included |
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
var prefix = (/mozilla/.test(navigator.userAgent.toLowerCase()) && | |
!/webkit/.test(navigator.userAgent.toLowerCase())) ? '-moz-' : | |
(/webkit/.test(navigator.userAgent.toLowerCase())) ? '-webkit-' : | |
(/msie/.test(navigator.userAgent.toLowerCase())) ? '-ms-' : | |
(/opera/.test(navigator.userAgent.toLowerCase())) ? '-o-' : ''; |
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
var Magic = function() { | |
var value = 0; | |
var operators = { | |
'plus': (a, b) => a + b, | |
'minus': (a, b) => a - b, | |
'times': (a, b) => a * b, | |
'dividedBy': (a, b) => a / b | |
}; | |
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 | |
/* | |
CREATED: January 17, 2017. | |
Instructions: | |
- This is not a plugin. So, Do not Download this file and install it on your wordpress site. Just copy any of the below code and paste it on the "form editor" of Wordpress Contact form 7 Plugin. | |
- You need to insert the corresponding mail-tag ([bangladesh-district]) into the field on the Mail tab. |
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
OlderNewer