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
""" | |
This is a good way of using Call/Report. | |
""" | |
class Call(object): | |
def get(self, url): | |
return requests.get(url) | |
class Report(object): |
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
#!/bin/bash | |
package_json=' | |
{ | |
"name": "frontend", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" |
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 yaml | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--config', type=str, default='settings.yaml') | |
args = parser.parse_args() | |
__settings = yaml.safe_load(open(args.config, 'r')) | |
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
#!/usr/bin/env bash | |
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete | |
find . -path "*/migrations/*.pyc" -delete | |
python manage.py makemigrations | |
python manage.py migrate |
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
# Names of herself and her friends | |
names = [ | |
'megumid.', | |
'anna', | |
'kana' | |
] | |
for name in names: | |
print('Hello', name) |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4xtUCMHOy8rpC4OvL45t4OGIGTlXKb7uWOfp/xcabmiAWgS8ER0arlkVbHQMHm6yMEVAQSaZUpWUV27gE3EARWid946P5us+yPx4e7rR4XZO6ppPDKs4XEi26F5eqWj/O6sVByhUeY/RV0Qo3kUkWQTJKJD7iSmYCLQrYwGboJK0KxMVFVdC0z3h9qjf7tRq/pEWA5STcpdLfFCVkPDCqAegULWQEpYl/+wPgNdS3rw+MPNHyxF1dz5tnrvyH8GMn80Vwff0k6TKfnDu+n3GxrvyJDwAnP6m4B5F6HJ0aYwodeoZvVmh/MTOzKu3dWZkp/ssoXpa0ktgJq+rLhW1Z brian@thonkpad |
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
const Spark = ({ | |
height = 20, | |
width = 140, | |
series = [], | |
color = "#4CAF50", | |
backgroundColor = "#37474F", | |
radius = 3, | |
padding = [4, 4] | |
}) => { | |
const max = series.reduce((p, c) => { |
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
[Unit] | |
Description=Restart trackpad after suspend | |
After=basic.target suspend.target hibernate.target | |
[Service] | |
User=root | |
Environment=DISPLAY=:0 | |
ExecStart=/usr/bin/restart-trackpad | |
[Install] |
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
#!/bin/bash | |
modprobe -r psmouse && modprobe psmouse |
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
!function () { | |
console.log("foo"); | |
}(); | |
(function() { | |
console.log("foo"); | |
})(); |