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
#still need to figure out what to do about tzinfo supposedly tzinfo=timezone.utc should work, but still needs to be tested | |
#currently print at every step just to evaluate what is going on | |
#need to look into (tzinfo=pytz.utc) and install pytz for some success | |
import datetime | |
d=datetime.datetime.now(timezone.utc) | |
print(d) | |
dt=d.replace(hour=00,minute=00,second=00) | |
print(dt) | |
ts=dt.timestamp(dt) | |
print(ts) |
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
''' | |
Taken from Programming Python. | |
''' | |
from socket import * | |
myHost = '' | |
myPort = 50007 | |
sockobj = socket(AF_INET, SOCK_STREAM) | |
sockobj.bind((myHost,myPort)) |
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
''' | |
Taken from Programming Python | |
''' | |
import sys | |
from socket import * | |
serverHost = 'localhost' | |
serverPort = 500007 | |
message = [b'Hello network world'] |
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
<!doctype> | |
<html> | |
<head> | |
<title>embedgist</title> | |
</head> | |
<body> | |
<script src="https://gist.github.com/ksaylor11/775f7d5ea92b070f4338.js"></script> | |
</body> | |
</html> |
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
# straight from the jinja documentation! | |
from jinja2 import Environment, FileSystemLoader | |
# configured to load from templates folder | |
env = Environment(loader=FileSystemLoader('templates') | |
template = env.get_template('mytemplate.html') | |
print template.render(the='variables', go='here') |
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
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |
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 ($paginator->hasPages()) | |
<ul class="pagination"> | |
{{-- Previous Page Link --}} | |
@if ($paginator->onFirstPage()) | |
<li class="disabled"><span>«</span></li> | |
<li class="disabled"><span>‹</span></li> | |
@else | |
<li><a href="{{ $paginator->toArray()['first_page_url'] }}" rel="prev">«</a></li> | |
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">‹</a></li> | |
@endif |
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
<select id="{{{ $element }}}" name="{{{ $element }}}"> | |
@foreach($choices as $choice) | |
<option value="{{{ $choice->id }}}" @php echo ((!is_null($selectId) && $selectId == $choice->id) ? 'selected': '' ); @endphp>{{{ $choice->name }}}</option> | |
@endforeach | |
</select> |
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 django.contrib import admin | |
from django.urls import path, include | |
from django.conf.urls import url | |
urlpatterns = [ | |
url(r'^', include('monitor.urls')), | |
url(r'^admin/', admin.site.urls), | |
] |
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 | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Authentication Defaults | |
|-------------------------------------------------------------------------- | |
| | |
| This option controls the default authentication "guard" and password |
OlderNewer