In Arch Linux
mkinitcpio -p linux
shows
Possibly missing firmware for module: aic94xx
Possibly missing firmware for module: wd719x
def upload_file(self, file_path, upload_url): | |
""" | |
Upload file using curl | |
based on https://github.com/Lispython/pycurl/blob/master/examples/file_upload.py | |
:param file_path: | |
:param upload_url: | |
:return: abs file url path of uploaded file. | |
""" | |
if file_path is None or not os.path.exists(file_path): | |
print("File '{}' cant be uploaded".format(file_path)) |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
key = "" | |
class AuthHandler(SimpleHTTPRequestHandler): | |
''' Main class to present webpages and authentication. ''' | |
def do_HEAD(self): |
#!/bin/sh | |
# Default path is root (/) | |
path="/" | |
# if string is not null | |
if [ -n "$1" ]; then | |
path="$1" | |
fi |
<?php | |
/** | |
* Decode a string with URL-safe Base64. | |
* | |
* @param string $input A Base64 encoded string | |
* | |
* @return string A decoded string | |
*/ | |
public static function urlsafeB64Decode( $input ) { | |
$remainder = strlen( $input ) % 4; |
<?php | |
/** | |
* Converts first char of array keys to lowercase | |
* | |
* @param $multd_array | |
* | |
* @return array | |
*/ | |
function maybe_convert_arraykeys_lcfirst( $multd_array ) { | |
$result = []; |
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
<?php | |
// Alters post type labels. | |
add_action( 'registered_post_type', 'change_post_type_labels', 10, 2 ); | |
// Posts menu label change to articles. | |
add_action( 'admin_menu', 'rename_post_menu_item_label' ); | |
/** | |
* Replace Posts label to Articles in post edit admin page |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
#!/usr/bin/env python | |
import requests, socket | |
username = "" | |
password = "" | |
hostname = "" # your domain name hosted in no-ip.com | |
# Gets the current public IP of the host machine. | |
myip = requests.get('http://api.ipify.org').text |