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
# | |
# Daemon for vault | |
# | |
# chkconfig: 345 99 20 | |
# description: Daemon for vault | |
# processname: vault | |
### BEGIN INIT INFO | |
# Provides: vault | |
# Required-Start: $network |
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
# | |
# Daemon for Consul | |
# | |
# chkconfig: 345 99 20 | |
# description: Daemon for vault | |
# processname: vault | |
### BEGIN INIT INFO | |
# Provides: consul | |
# Required-Start: $network |
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
# first version | |
def boo1(l=[]): | |
l = list(l) | |
l.append(1) | |
return l | |
# second version | |
def boo2(l=[]): | |
result = [] | |
result.extend(l) |
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 random import randrange | |
class Card(): | |
def __init__(self, rank, suit): | |
self.rank = rank | |
self.suit = suit | |
card_list = [Card("HEARTS", 4), |
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 flask import Flask | |
from flask.ext.testing import TestCase | |
from mtportal.app import create_app | |
class TestConfig(object): | |
DEBUG = False | |
TESTING = True |
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
#SQL alchemy object to list method | |
def to_dict(data): | |
""" | |
:param data: | |
:returns objects list in dictionary : | |
""" | |
return [u.__dict__ for u in data] |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/0.2.1/trianglify.min.js"></script> | |
<style> | |
width:500px; | |
height:500px; | |
</style> | |
<div id="main" class="main"> | |
<script> | |
function addTriangleTo(target) { |
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 gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var minifyCss = require('gulp-minify-css'); | |
gulp.task('js', function() { | |
return gulp.src('public/javascripts/*.js') | |
.pipe(uglify()) | |
.pipe(gulp.dest('public/javascripts/min')); | |
}); |
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 node | |
var debug = require('debug')('invoice'); | |
var app = require('../app'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var https = require('https'); | |
var http = require('http'); | |
var key = fs.readFileSync('/etc/ssl/private/server.key'); |
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
/* aaData[aiDisplay[i]][9] String was like this and i want to get Integer 6947 */ | |
/*<a href="#"> | |
<button type="button" class="btn btn-outline btn-success btn-xs"> 6947 </button> | |
</a>*/ | |
var cost = aaData[aiDisplay[i]][9].replace(/<a\b[^>]*>/i,""); | |
cost = cost.replace(/<button\b[^>]*>/i,""); | |
cost = cost.replace(/<\/a>/i, ""); | |
cost = cost.replace(/<\/button>/i, ""); |