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/sh | |
#################################### | |
# Update a UniFi Controller installation on Alpine Linux | |
# | |
# Assumes that the unifi service can be manipulated with "rc-service unifi <start/stop>" | |
# | |
# For initial installation see https://wiki.alpinelinux.org/wiki/UniFi_Controller | |
# Additional steps: | |
# - apk add --no-cache libc6-compat |
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 bash | |
# This script requires: | |
# - that the directory $HOME/.mpv exist | |
# - that the program socat be installed | |
# - that you start mpv with the unix socket feature pointing at that directory | |
# I recommend an alias in your .bashrc or equivalent file: | |
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket" | |
socket="$HOME/.mpv/socket" |
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 | |
################################################################################ | |
### TBW for Samsung SSD ### | |
### -by GGetsov ### | |
### ------------------------------------------------------------------------ ### | |
### Requires: Cygwin, bash (with arrays support), bc, smartctl ### | |
################################################################################ | |
arrtest[0]="1"||(echo "Failure: arrays not supported in this version of bash."&&exit 2) | |
#var | |
ver="0.2.4" |
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
""" | |
KEONN - Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
python3.9 httpServer.py 8000 | |
""" | |
import sys | |
if str(sys.version)[0] == '3': | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
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
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
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
How to Completely Remove Android Studio | |
Execute these commands from the terminal | |
rm -Rf /Applications/Android\ Studio.app | |
rm -Rf ~/Library/Preferences/AndroidStudio* | |
rm ~/Library/Preferences/com.google.android.studio.plist | |
rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
rm -Rf ~/Library/Logs/AndroidStudio* |
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
Go step-by-step through following instructions to set up L2TP/IPSec VPN on Centos 7. | |
To set up the VPN client on centos 7, first install the following packages: | |
yum -y install epel-release | |
yum -y install strongswan xl2tpd | |
Create VPN variables (replace with actual values): | |
VPN_SERVER_IP='your_vpn_server_ip' | |
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
sudo apt-get install bind9 bind9utils bind9-doc | |
wget https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip | |
/etc/bind/named.conf.options: | |
options { | |
directory "/var/cache/bind"; | |
recursion yes; | |
allow-query { localhost; }; | |
forwarders { |
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
Lenovo Thinkcentre M92P | |
When booting to USB installer disk installation proceeds as expected | |
1962 no operating system found | |
When booting into preview mode all disks load without issue, so its not the cable | |
Secure Boot option either not present or disabled | |
Last time I fixed this by adding a fake line to the boot loader from instructions on the web | |
Got a warning during installation about UEFI mode | |
Windows Fast Startup disabled | |
jfly comment below: |
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
from django.db import transaction | |
from rest_framework import mixins | |
from rest_framework.viewsets import GenericViewSet | |
__all__ = ['AtomicCreateModelMixin', 'AtomicUpdateModelMixin', 'AtomicDestroyModelMixin', | |
'AtomicModelViewSetMixin', 'AtomicModelViewSet'] | |
class AtomicCreateModelMixin(mixins.CreateModelMixin): |