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
| import mimetypes | |
| import os | |
| from theerrorisme.database import ( | |
| Column, | |
| db, | |
| SurrogatePK, | |
| ModifiedCols | |
| ) |
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 sqlalchemy.event import listens_for | |
| from sqlalchemy.orm import Session | |
| class ModifiedCols(object): | |
| date_created = Column(db.DateTime(), default=datetime.datetime.now()) | |
| last_modified = Column(db.DateTime(), default=datetime.datetime.now()) | |
| @listens_for(Session, "before_flush") | |
| def update_action(session, flush_context, instances): |
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 rename = require('gulp-rename'); | |
| var fileinclude = require('gulp-file-include'); | |
| var browserSync = require('browser-sync'); | |
| var path = require('path'); | |
| var prettify = require('gulp-prettify'); | |
| var jpegoptim = require('imagemin-jpegoptim'); | |
| var pngquant = require('imagemin-pngquant'); | |
| var optipng = require('imagemin-optipng'); | |
| var reload = browserSync.reload; |
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
| ; Keep data labels. Compiler needs to know that these are to be initialized in memory | |
| ; Multiple direct data types: Decimal numbers, strings, hex (0xFF) | |
| ; General 32 bit registers | |
| ; Standard general data types: BYTE, DWORD, WORD, QWORD, etc... | |
| .data | |
| plain BYTE ? ; I like this syntax | |
| code BYTE ? | |
| prompt BYTE "Enter a string: ", 0 | |
| msg BYTE "The encoded string is:",0 | |
| buf BYTE DUP(100)? ; This is a little confusing |
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
| for(int i = 1; i <= n; i++){ | |
| for(int j = 1; j <= 2 * i; j *= 2){ | |
| // do stuff | |
| } | |
| } |
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
| <templateSet group="jinja"> | |
| <template name="jinelse" value="{% else %} $END$" description="A simple else line" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="HTML_TEXT" value="true" /> | |
| <option name="HTML" value="true" /> | |
| <option name="Django" value="true" /> | |
| </context> | |
| </template> | |
| <template name="jinblock" value="{% block $BLOCKNAME$ %} $END$ {% endblock %} " description="A generic jinja block" toReformat="true" toShortenFQNames="true"> | |
| <variable name="BLOCKNAME" expression="" defaultValue="" alwaysStopAt="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
| index = "1" | |
| color_codes = { | |
| "0": ["white", "white", "white", "black", "black", "white", "black"], | |
| "1": ["white", "white", "black", "black", "white", "white", "black"], | |
| "2": [], # More line colors here | |
| "3": [], # More line colors here | |
| "4": [], # More line colors here | |
| "5": [], # More line colors here | |
| "6": [], # More line colors 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
| index = "1" | |
| color_codes = { | |
| "0": ["white", "white", "white", "black", "black", "white", "black"], | |
| "1": ["white", "white", "black", "black", "white", "white", "black"], | |
| "2": [], # More line colors here | |
| "3": [], # More line colors here | |
| "4": [], # More line colors here | |
| "5": [], # More line colors here | |
| "6": [], # More line colors 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
| <? | |
| $file = "app/config/app.php"; | |
| $file_contents = file($file); | |
| //the blank line is needed for consistency | |
| $service_providers = <<<SERVICE_PROVIDERS | |
| 'Shoulderscms\Shoulderscms\ShoulderscmsServiceProvider', | |
| 'Lavary\Menu\ServiceProvider', | |
| 'Jaybizzle\Safeurl\SafeurlServiceProvider', |
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
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: Deathnerd | |
| * Date: 12/13/2014 | |
| * Time: 2:30 PM | |
| */ | |
| /** | |
| * This takes html with a wordpress-esque shortcode block with the format of: |