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
| [[source]] | |
| url = "https://pypi.org/simple" | |
| verify_ssl = true | |
| name = "pypi" | |
| [packages] | |
| django = "*" | |
| celery = "*" | |
| coverage = "*" | |
| django-rest-framework = "*" |
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 . -name "$1" | |
| read -p "Do you wish to remove these files? (y/N) " yn | |
| case ${yn:0:1} in | |
| [Yy]* ) find . -name "$1" -delete;; | |
| * ) exit;; | |
| esac | |
| echo "Files have been removed" |
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 IPython import get_ipython | |
| from IPython.terminal.prompts import Prompts, Token | |
| c = get_config() | |
| class SimplePrompt(Prompts): | |
| def in_prompt_tokens(self, cli=None): | |
| return [(Token.Prompt, '[{}] >>> '.format(self.shell.execution_count))] |
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 | |
| function css_build { | |
| echo "Starting build..." | |
| lessc --verbose ./less/main.less ../assets/css/app.css | |
| echo "Completed at `date +%H:%I:%S`" | |
| } | |
| function css_watch { | |
| echo "Building CSS on changes (CTRL+C to stop)" |
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
| def handle_checkdigit(upc, append=False): | |
| if len(upc) not in [11, 12]: | |
| raise ValueError('Given UPC must be 11 or 12 digits') | |
| bool_mode = len(upc) == 12 | |
| if bool_mode: | |
| check_digit = upc[11] | |
| upc = [int(i) for i in upc[:11]] | |
| odd = [] |
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 json | |
| import sys | |
| from flask import Flask, request | |
| app = Flask(__name__) | |
| @app.route('/', methods=['POST']) |
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
| # Thinkpad T420 | |
| hwmon /sys/devices/virtual/thermal/thermal_zone0/temp | |
| hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input | |
| hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input | |
| hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input | |
| tp_fan /proc/acpi/ibm/fan | |
| # Semi aggressive | |
| #(0, 0, 55) |
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 python | |
| import os | |
| import sys | |
| class ProgramError(Exception): | |
| pass | |
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 os.path as op | |
| import sublime_plugin | |
| class CurrentFile(sublime_plugin.EventListener): | |
| def on_activated_async(self, view): | |
| encoding = view.encoding() | |
| if encoding == 'Undefined': | |
| encoding = '' |
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
| 'use strict'; | |
| var http = require('http'); | |
| var https = require('https'); | |
| var zlib = require('zlib'); | |
| module.exports = function (grunt) { | |
| grunt.registerMultiTask('httpfetch', 'Fetch file over HTTP', function () { | |
| var _this = this; | |
| this.files.forEach(function (file) { |