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
#!/bin/bash | |
#set -e | |
# origin-source: http://www.fars-robotics.net/install-wifi | |
# install-wifi - v9.4 - by MrEngman. | |
# After downloading this script: | |
# $ sudo mv ./install-wifi /usr/bin/install-wifi | |
# $ sudo chmod +x /usr/bin/install-wifi | |
# $ sudo install-wifi -h | |
# |
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
# initial version: http://stackoverflow.com/a/7936523/617185 \ | |
# by Mikhail Kashkin(http://stackoverflow.com/users/85739/mikhail-kashkin) | |
def get_yt_video_id(url): | |
"""Returns Video_ID extracting from the given url of Youtube | |
Examples of URLs: | |
Valid: | |
'http://youtu.be/_lOT2p_FCvA', | |
'www.youtube.com/watch?v=_lOT2p_FCvA&feature=feedu', |
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
"use strict"; | |
// src: https://stackoverflow.com/a/28002292 | |
const getScript = (source, callback) => { | |
var script = document.createElement('script'); | |
var prior = document.getElementsByTagName('script')[0]; | |
script.async = 1; | |
script.onload = script.onreadystatechange = (_, isAbort) => { | |
if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { |
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 System; | |
using System.IO; | |
using System.Net; | |
using System.Web; | |
public class UploadWithProgress | |
{ | |
public static double PercentUploaded; | |
public static string FilePath; | |
public static string Result; |
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
""" | |
=============== | |
pep8_tonizer.py | |
=============== | |
This script can be used to make python code, that is being edited on Notepad++, \ | |
to comply with infamous PEP8 coding style [http://bit.ly/pep8] | |
By default, autopep8 only makes whitespace changes. So does this script. | |
However, this script depends on following: | |
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 python2.7 | |
""" | |
Parallel RSS-Feed Downloader | |
---------------------------- | |
Download contents by grabbing links from a given RSS-feed. | |
Works over HTTP,FTP,HTTPS protocol transparently. | |
Currently, works on Linux, Mac OSX, and possibly on other Unix as well. | |
But, _NOT_ on Windows * yet. | |
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 -*- | |
#************************************************************************** | |
# Copyright (C) 2011, Paul Lutus * | |
# * | |
# This program is free software; you can redistribute it and/or modify * | |
# it under the terms of the GNU General Public License as published by * | |
# the Free Software Foundation; either version 2 of the License, or * | |
# (at your option) any later version. * |
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
// This is the companion code for the linked blog | |
// https://blog.kmonsoor.com/on-edge-shortlink-server-cloudflare-kv-worker | |
// Please check the blog to get the context | |
// author : Khaled Monsoor (@kmonsoor) | |
// last updated: 25-May-2021 | |
const failsafeURL = "https://kmonsoor.com" // replace it with yours ;) | |
const defaultStatusCode = 301 // standard HTTP code for redirection, don't change | |
addEventListener("fetch", (event) => { |
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
#### other settings ... | |
[smtp] | |
enabled = true | |
host = smtp.gmail.com:465 | |
user = grafana-bot@organization.com | |
password = """PASSWORD""" | |
from_address = grafana-bot@organization.com | |
from_name = Grafana Bot | |
;cert_file = |
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
# replce server address with actual Jira host for your case | |
options = {'server': 'https://jira.atlassian.com'} | |
#login | |
jira = JIRA(options, basic_auth=(os.environ['JIRA_USERNAME'], os.environ['JIRA_PASSWORD'])) | |
#get currently available version names | |
project = jira.project('PROJECT-KEY') | |
versions = jira.project_versions(project) | |
current_versions = [v.name for v in reversed(versions)] |
NewerOlder