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 random import choice, randint | |
## Beat poetry | |
adjectives = "radiant bright ecstatic young lithe driving running splitting".split() | |
verbs = "wriggles grows stares saunters drives smiles raps".split() | |
nouns = "pen inkwell willow sky station train pane window sunlight dust".split() | |
def beat_poem(): | |
print "\n" + "="*16+" a poem " + "="*16 |
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 Puppet::Parser::Functions | |
newfunction(:django_secret_key) do |args| | |
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$^&*(-_=+)' | |
password = '' | |
50.times { password << chars[rand(chars.size)] } | |
return password | |
end | |
end |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.db import models, migrations | |
def replicate_company(apps, schema_editor): | |
""" | |
THIS FUNCTION IS BROKEN |
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
# filename: happy_birthday.py | |
"""A basic (single function) API written using hug""" | |
import hug | |
@hug.type(extend=hug.types.number) | |
def extend_test(value): | |
print(value) | |
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
var fs = require('fs'); | |
fs.readFile('notarealfile', 'utf8', function(err, data){ | |
try { | |
var config = JSON.parse(data); | |
} catch(e) { | |
console.log(e); | |
} | |
}); |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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
[fleet_cmv@cmvfleet ~]$ | |
[fleet_cmv@cmvfleet ~]$ | |
[fleet_cmv@cmvfleet ~]$ | |
[fleet_cmv@cmvfleet ~]$ pip install pip --upgrade --user | |
Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b | |
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded | |
Installing collected packages: pip | |
Successfully installed pip | |
Cleaning up... | |
[fleet_cmv@cmvfleet ~]$ |
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
image: alpine | |
before_script: | |
- apk add openssh --update | |
deploy: | |
stage: deploy | |
script: | |
- mkdir -p ~/.ssh | |
- echo -e $SSH_KNOWN_HOSTS > ~/.ssh/known_hosts |
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
if(window.location.pathname == '/vehicles/standard-fields/') { | |
require.ensure(['./vehicles/standard-fields/main'], function(require){ | |
var standard_fields = require('./vehicles/standard-fields/main') | |
standard_fields.default() | |
}) | |
} else if(window.location.pathname == '/service/bom-builder/') { | |
require.ensure(['./service/bom-builder/main'], function(require){ | |
var bom_builder = require('./service/bom-builder/main') | |
bom_builder.default() |
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
var webpack = require("webpack") | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
entry: ['bootstrap-loader', 'clipboard', 'whatwg-fetch', 'es6-promise', "./js"], | |
output: { | |
path: "./dealerpro_helpers/static/build/", | |
filename: "bundle.js", | |
publicPath: "/static/build/" | |
}, |
OlderNewer