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
from bs4 import BeautifulSoup as bs | |
import sys | |
f = open('1.xml').read() | |
soup = bs(f) | |
# print(soup.prettify() | |
errorcode = soup.find_all("errorcode") | |
try: |
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
// --------- LESS ------------ | |
.view-enter.ng-enter{ | |
.transition(0.4s ease-in-out all); | |
opacity:0; | |
&.ng-enter-active{ | |
opacity:1; | |
} | |
} | |
// ------- Samething in css ----------- |
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
// Generated on 2013-11-17 using generator-angular 0.6.0-rc.1 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { |
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
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \ | |
--enable-libmp3lame \ | |
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --prefix=/usr/local |
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 mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', | |
password : 'mysql' | |
}); | |
connection.connect(); | |
connection.query('CREATE TABLE test.table1(Col1 VARCHAR(10), Col2 VARCHAR(50))', function(err, rows, fields) { |
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 camelCase(input) { | |
return input.charAt(0).toLowerCase() + input.slice(1); | |
} | |
function allCapitalCasetoCamelCase(obj) { | |
var output = {}; | |
for (i in obj) { | |
if ((Object.prototype.toString.apply(obj[i]) === '[object Object]') || (Object.prototype.toString.apply(obj[i]) === '[object Array]') ) { | |
output[camelCase(i)] = allCapitalCasetoCamelCase(obj[i]); | |
} else { |
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
// Karma configuration | |
// http://karma-runner.github.io/0.10/config/configuration-file.html | |
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '', | |
// testing framework to use (jasmine/mocha/qunit/...) | |
frameworks: ['jasmine'], |
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
describe('Test', function() { | |
beforeEach(function() { | |
module('App', function($provide) { | |
$provide.constant('CSRF_TOKEN', 'MOCK_CONSTANT'); // <= mock your constant | |
}); | |
}); | |
// Tests go here |
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
#Do this before the new commit | |
tag=$(git tag -l --contains HEAD) | |
# -- After the commit -- | |
if [[ -n $tag ]]; then | |
echo "Tag found, moving it" | |
git tag -d $tag | |
git tag $tag | |
fi |
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
location ^~ /blog { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://127.0.0.1:2368; | |
proxy_redirect off; | |
} |
OlderNewer