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 re | |
def _guess_quote_and_delimiter(data, delimiters=None): | |
""" | |
Looks for text enclosed between two identical quotes | |
(the probable quotechar) which are preceded and followed | |
by the same character (the probable delimiter). | |
For example: | |
,'some text', | |
The quote with the most wins, same with the delimiter. |
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
## The order of the types in this file is important. | |
## This file exposes an array that defines the order in which the types will be matched. | |
## | |
## Always ensure that the extensions (and related) are properly lowercased. | |
version: '1' | |
types: | |
- name: gpkg | |
extensions: |
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
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab |
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 python | |
import sys | |
from datetime import datetime | |
import subprocess | |
DB_LOGIN = 'root' | |
DB_PASSWD = 'XXXX' | |
VAULT_NAME = 'backup_sunny' | |
HOSTNAME = 'Sunny' |
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
# originally copied from http://michael.gorven.za.net/blog/2012/10/22/building-raspbian-images-raspberry-pi | |
# Copyright (C) 2012 Michael Gorven <http://michael.gorven.za.net/> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
myApp.config(['$httpProvider', function($httpProvider) { | |
$httpProvider.defaults.useXDomain = true; | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
} | |
]); |
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
# CORS Headers (add this) | |
<ifModule mod_headers.c> | |
Header always set Access-Control-Allow-Origin: "*" | |
Header always set Access-Control-Allow-Methods "POST, GET, PUT, DELETE, OPTIONS" | |
Header always set Access-Control-Allow-Headers "X-Requested-With, content-type" | |
</ifModule> | |
# BEGIN WordPress (you should have this in your original WP .htaccess) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
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
module.directive('mesureTime', function() { | |
return { | |
restrict: 'A', | |
// require: 'ngModel', | |
link: function(scope, elm, attrs, ctrl) { | |
var timeTouch; | |
elm.on('click', function() { | |
if (timeTouch) { | |
alert(new Date().getTime() - timeTouch, " ms"); | |
} else { |