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
| cat > path/to/outfile <<DELIM # DELIM can be any delimiter | |
| hello line 1 | |
| hello line 2 | |
| bye | |
| DELIM |
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
| <div class="mappy" style="overflow: hidden; width: 800px; height: 400px; position: relative; cursor: auto;"> | |
| <img id="worldMap" alt="A map of the world." src="map.jpg" style="position: absolute; left: -141px; top: -272px;"> | |
| </div> |
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
| (line_bak, col_bak) = (vim.eval("line('.')"), vim.eval("col('.')")) | |
| """ | |
| do something | |
| """ | |
| vim.command("call cursor('{0}', '{1}')".format(line_bak, col_bak)) |
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
| def import_path(fullpath): | |
| """ | |
| Import a file with full path specification. Allows one to | |
| import from anywhere, something __import__ does not do. | |
| """ | |
| path, filename = os.path.split(fullpath) | |
| filename, ext = os.path.splitext(filename) | |
| sys.path.append(path) | |
| module = __import__(filename) | |
| reload(module) # Might be out of date |
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 serial_code = $("#serial-code-input>input").map(function(){ | |
| return this.value; | |
| }).get().join(''); |
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
| #! /usr/bin/env perl | |
| use warnings; | |
| use strict; | |
| use utf8; | |
| use JSON::XS; | |
| use Data::Compare; | |
| use Path::Class; | |
| my ($a_json, $b_json) = @ARGV; |
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
| " 保持轮换文件不变,在左上角垂直打开宽度为20的窗口,打开文件__BufName__ | |
| silent keepalt topleft vertical 20split __BufName__ |
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
| SELECT me.id, him.nickname, me.user_id, transaction_id, purchase_at FROM payment AS me INNER JOIN user AS him ON me.user_id = him.id WHERE him.nickname = 'tama'; |
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
| noremap <silent><expr>n v:searchforward ? "n" : "N" | |
| noremap <silent><expr>N v:searchforward ? "N" : "n" |
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
| use Test::More; | |
| use Test::MockModule; | |
| use HTTP::Request; | |
| our $request_count = 0; | |
| my $mock_ua = Test::MockModule->new('LWP::UserAgent'); | |
| $mock_ua->mock('request', sub { | |
| $request_count++; | |
| HTTP::Response->new(200); | |
| }); |
OlderNewer