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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Fallback to Less</title> | |
<script type="text/javascript"> | |
function fallbackToLess(){ | |
var script = document.createElement('script'); | |
script.src = "js/libs/less-1.7.0.min.js"; |
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($){ | |
if(!$) { | |
return; | |
} | |
var match = document.cookie.match(/csrftoken=(\w+)/); | |
var token = match ? match[1] : ''; | |
$.ajaxSetup({ | |
headers: { 'X-CSRFToken': token } |
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
/** | |
* I'm not author of this script. The author (I guess) can be found | |
* at http://pipetree.com/qmacro/blog/2013/10/sheetasjson-google-spreadsheet-data-as-json/ | |
*/ | |
function doGet(request) { | |
var output = ContentService.createTextOutput(); | |
var data = {}; | |
var id = request.parameters.id; | |
var sheet = request.parameters.sheet; | |
var ss = SpreadsheetApp.openById(id); |
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
// http://jsfiddle.net/montefuscolo/ogtzpt4t/ | |
Object.defineProperty( | |
Array.prototype, | |
'group', | |
{ | |
enumerable: false, | |
value: function (n) { | |
var initial = [ | |
[] |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+k", "ctrl+m"], "command": "md5fy" }, | |
{ "keys": ["ctrl+k", "ctrl+n"], "command": "numbering" } | |
] |
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
#!/bin/bash | |
script_id="$$"; | |
files=`find /proc/$script_id/fd -not -type d`; | |
for file in $files; | |
do | |
echo $file && ls -l $file | |
if [ -a "$file" ]; then echo $file' -a - True if file exists.'; fi |
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
; Maps para copiar e colar no Vim | |
:vmap <C-c> "+y ; Ctrl+C, funciona em Visual Mode | |
:vmap <C-x> "+x ; Ctrl+X, funciona em Visual Mode | |
:imap <C-v> <ESC>"+gpA ; Ctrl+V, funciona em Insert Mode |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>br.com.projeto</groupId> | |
<artifactId>nomedoartefato</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>nome do projeto</name> | |
<url>http://maven.apache.org</url> | |
<build> |
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
server { | |
listen 80; | |
server_name example.com; | |
root /srv/www/wordpress-ms; | |
gzip on; | |
gzip_disable "msie6"; | |
gzip_min_length 1100; | |
gzip_buffers 16 8k; |
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
public void removeDirectory(String path) throws Exception { | |
Stack<File> dirs = new Stack<File>(); | |
File root = new File(path); | |
File currentDir = root; | |
dirs.add(root); | |
while(!dirs.empty()) { | |
currentDir = dirs.lastElement(); | |
File files[] = currentDir.listFiles(); | |
for(int i=0; i<files.length; i++) { | |
if(files[i].isDirectory()) { |
OlderNewer