start new:
tmux
start new with session name:
tmux new -s myname
| try: | |
| from django.utils.deprecation import MiddlewareMixin | |
| except ImportError: | |
| MiddlewareMixin = object | |
| class ForceDefaultLanguageMiddleware(MiddlewareMixin): | |
| """ | |
| Ignore Accept-Language HTTP headers | |
| // example | |
| User = Backbone.Model.extend({ | |
| url: function() { | |
| var origUrl = Backbone.Model.prototype.url.call(this); | |
| return origUrl + (origUrl.charAt(origUrl.length - 1) == '/' ? '' : '/'); | |
| } | |
| }); |
| #!/usr/bin/php | |
| <?php | |
| /* Transmission to Deluge export script | |
| * | |
| * Transmission - transmission-gtk 2.77 (14031) | |
| * Deluge - deluge: 1.3.6 | |
| * Script - PHP 5.4.14 (cli) | |
| * | |
| * How to use this script; | |
| * 1) Run `php trans_to_deluge.php` and make sure there aren't any errors. |
| from selenium import webdriver | |
| def before_all(context): | |
| context.browser = webdriver.Firefox() | |
| def after_all(context): | |
| context.browser.quit() |
| # -*- coding: utf-8 -*- | |
| ''' | |
| Tricky admin -> xadmin merger. | |
| Alex Moiseenko aka IMDagger. | |
| ''' | |
| import logging | |
| import types | |
| from functools import wraps, update_wrapper | |
| from django.http import HttpRequest | |
| from django.contrib.admin import ModelAdmin |
| package main | |
| import ( | |
| "log" | |
| "math" | |
| ) | |
| func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
| var round float64 | |
| pow := math.Pow(10, float64(places)) |
| // Copyright 2016 Prometheus Team | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.
Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.
mkdir ~/mnt/dropbox| #!/bin/bash | |
| # ============================================================================== | |
| # KEYCHRON LINUX FIX F0R HID DEVICE C0NNECTED [K] | |
| # Author: morkev | |
| # | |
| # Contributors: | |
| # - SIMULATAN: Fixed dongle interference by filtering out "Link" devices. | |
| # - karoltheguy: Added SELinux context reset (restorecon) to prevent silent blocks. | |
| # - wanjas: Verified 'input' group addition is required for distros like Pop_OS. |