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 python | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>Loadshedding Status</bitbar.title> | |
# <bitbar.version>v0.2</bitbar.version> | |
# <bitbar.author>Ronald Langeveld</bitbar.author> | |
# <bitbar.author.github>ronaldlangeveld</bitbar.author.github> | |
# <bitbar.image>https://i.imgur.com/JA7S0t7.png</bitbar.image> | |
# <bitbar.desc>Shows the current Loadshedding 💩 status</bitbar.desc> | |
# <bitbar.dependencies>python</bitbar.dependencies> | |
# |
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
const _ = require(`lodash`) | |
const Promise = require(`bluebird`) | |
const path = require(`path`) | |
exports.createPages = ({ graphql, actions }) => { | |
const { createPage } = actions | |
const createPosts = new Promise((resolve, reject) => { | |
const postTemplate = path.resolve(`./src/templates/blogTemplate.js`) | |
resolve( | |
graphql(` |
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
.container { | |
margin: 0 auto; | |
position: relative; | |
} | |
@media screen and (min-width: 1088px) { | |
.container { | |
max-width: 960px; | |
width: 960px; | |
} |
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 os | |
import datetime | |
from datetime import datetime | |
from flask import Flask | |
import json | |
from flask import request, url_for | |
from flask_sqlalchemy import SQLAlchemy | |
from flask import jsonify, json, request | |
from flask_cors import CORS | |
from flask_bcrypt import Bcrypt |
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
.bigHeaderFont { | |
font-size: 20em; | |
} | |
@media (max-width:1024px) { | |
.bigHeaderFont { | |
font-size:10em; | |
} |
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
function ResizeImage() { | |
var description = $('#imgdescription').val(); | |
var project_name = $('#project_name').val(); | |
if (window.File && window.FileReader && window.FileList && window.Blob) { | |
var filesToUploads = document.getElementById('imageFile').files; | |
var file = filesToUploads[0]; | |
if (file) { | |
var reader = new FileReader(); | |
// Set the image once loaded into file reader |
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
//HtML | |
<form> | |
{% csrf_token %} | |
<input type="file" name="pic" accept="image/*" id="image"> | |
<input type="submit" id="send"> | |
</form> | |
//JS |
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 json | |
import io | |
mydata = json.load(io.open('library.json', 'r', encoding='utf-8-sig')) | |
# print(mydata['plist']['dict']['dict']['dict'][1]['string'][0]) | |
a = mydata['plist']['dict']['dict']['dict'] | |
for k in a: | |
data = k['string'] | |
song = data[0] | |
artist = data[1] | |
print(song, ' , ', artist) |
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
USING JSON WITH JAVASCRIPT BASICS. | |
CREDIT GOES TO: https://github.com/Fanna1119 | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400" rel="stylesheet"> | |
</head> |
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
[Unit] | |
Description=bot | |
After=network.target | |
[Service] | |
User=username | |
Type=idle | |
ExecStart=/home/user/bots/venv/bin/python3.6 /home/user/bots/botscript.py | |
[Install] |
NewerOlder