This file contains 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
import os | |
import re | |
def replace(file_path, pattern, string): | |
with open(file_path) as current_file: | |
with open(file_path + '_new', 'w') as temp_file: | |
for line in current_file: | |
new_line = re.sub(pattern, string, line) | |
temp_file.write(new_line) | |
os.rename(file_path + '_new', file_path) |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
my $table = shift; | |
open(my $fh, '<',shift) or die $!; | |
my $exportfile = shift; | |
open (FILE,">",$exportfile); |
This file contains 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 | |
//-------------------------------- | |
//Simphple Gallery | |
//Version: 0.1 | |
//Author: tehsis <tehsis@gmail.com> | |
//Desc: It creates an image gallery from | |
//a directory containing images files | |
//-------------------------------- | |
//Modify this variables to fit your needs |
This file contains 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
jQuery.fn.extend({ | |
dataset: function(){ | |
var attributes = {}; | |
if(!this.length) | |
return {}; | |
var elem = this[0]; | |
var attrLength = elem.attributes.length; | |
This file contains 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 ($) { | |
$.fn.filterByDataset = function(compare) { | |
return this.filter( function() { | |
if ($.fn.dataset) { | |
var attributes = $(this).dataset(); | |
} else { | |
var attributes = this.dataset; | |
} | |
var match = true; |
This file contains 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
/** | |
* A jquery plugin to create a simple | |
* tabbed navigation. | |
* Author: Pablo Terradillos | |
*/ | |
(function($) { | |
var that; | |
var _menu = 'ul' |
This file contains 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
#!/usr/bin/env perl | |
use strict; | |
use locale; | |
use feature 'unicode_strings'; | |
my @words; | |
my @tabues; | |
while(<>) { |
This file contains 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 foo = "bar"; | |
foo.toUpperCase(); // "BAR" |
This file contains 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 foo = "bar"; | |
foo.num = 5; | |
console.log(foo.num); // undefined |
This file contains 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 a = "foo"; | |
var b = new String("bar"); | |
var c = a + b; | |
a.a = 5; | |
b.a = 5; | |
console.log(c); // "foobar" | |
console.log(a.a); // undefined |
OlderNewer