<form name="confirm_form" method="post" action="{{ url_for('auth.process_confirm') }}" class="col-md-offset-3 col-md-6">
{{ form.hidden_tag() }}
{% if form.password %}
{{ render_field(form.password, class_='form-control', label_class='sr-only', placeholder='비밀번호', size=30, addon='fa fa-lock fa-lg',
required=True, **{'ng-model': "credentials.password", 'ng-keyup': "check_strength(credentials)"}) }}
{% endif %}
<div class="form-group" ng-if="strength_result">
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 | |
for dname in *; | |
do | |
if [ -d "$dname" ]; | |
then | |
cd "$dname" | |
for name in *.ogg; | |
do | |
ffmpeg -i "$name" -ab 256k "${name/.ogg/.mp3}" |
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
from PIL import Image | |
img = Image.new("RGBA", (400,570)) | |
bg = Image.open("./s3.png") | |
fg = Image.open("./p1.png") | |
img.paste(bg, (0,0),bg) | |
img.paste(fg, (0,0),fg) | |
bg.paste(fg, (0, 0), fg) |
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 string | |
import random | |
print string.ascii_letters | |
print string.digits | |
allow_letters = string.ascii_letters + string.digits | |
print allow_letters |
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
img_io = cStringIO.StringIO() | |
app = current_app._get_current_object() | |
try: | |
#pil_img.thumbnail(tuple(size), Image.ANTIALIAS) | |
#pil_img.save(img_io, 'PNG') | |
#img_io.seek(0) | |
resized_img = pil_img.resize(tuple(size), Image.ANTIALIAS) | |
resized_img.save(img_io, 'PNG') |
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
<?php | |
$http_header = array(); | |
/** | |
* Get the header info to store. | |
*/ | |
function getHeader($ch, $header) { | |
global $http_header; | |
$i = strpos($header, ':'); | |
if (!empty($i)) { |
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
find . -name '*_DiskStation_*_Conflict*' | while read line; do | |
echo "Processing file '$line'" | |
mv "$line" "$(echo "$line" | sed -r 's/_DiskStation_[a-zA-Z]{3}-[0-9]{2}-[0-9]{4}-[0-9]{4}_Conflict//')" | |
done |
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
from sqlalchemy import event | |
@event.listens_for(Model, 'after_update') | |
@event.listens_for(Model, 'after_delete') | |
@event.listens_for(Model, 'after_insert') | |
def receive_after_change(mapper, connection, target): | |
from flask import current_app | |
current_app.logger.info('Model>receive_after_change') | |
from subprocess import call | |
call("touch tmp/reload", shell=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer