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
--- a/udev-installer.sh 2018-12-09 12:05:53.772318942 +0100 | |
+++ b/udev-installer.sh 2018-12-09 12:06:19.939947629 +0100 | |
@@ -24,12 +24,12 @@ systemd_start_stop_functions() | |
cat <<'EOF' | |
start_service() | |
{ | |
- systemctl start displaylink-driver | |
+ @systemd@/bin/systemctl start --no-block dlm | |
} | |
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
let | |
pkgs = import <nixpkgs> {}; | |
newpkgs = pkgs.extend (self: super: { | |
xorg = super.xorg // { | |
xorgserver = super.xorg.xorgserver.overrideAttrs (old: { | |
name = "xorg-server-1.19.6"; | |
src = super.fetchurl{ | |
url = mirror://xorg/individual/xserver/xorg-server-1.19.6.tar.bz2; | |
sha256 = "15y13ihgkggmly5s07vzvpn35gzx1w0hrkbnlcvcy05h3lpm0cm7"; | |
}; |
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 bs4 import BeautifulSoup | |
f = open("index.html", "r") | |
data = f.read() | |
f.close() | |
bs = BeautifulSoup(data, "html.parser") | |
elements = {} |
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
#!/bin/bash | |
# Linux SCP Backup Script | |
# how it works | |
# - | |
#date string | |
d=$(date --iso) |
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 requests | |
url = "https://images.wagcdn.com/800/600/scale/p/skadesformular/{0}_{1}.jpg" | |
for caseNumber in range(77667, 100000): | |
for caseImage in range(0, 5): | |
req = requests.get(url.format(caseNumber, caseImage)) | |
if not req.status_code == 200: | |
continue |
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 html | |
import requests | |
from bs4 import BeautifulSoup | |
import random | |
import base64 | |
class lass(object): | |
def __init__(self): | |
self.s = requests.session() |
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 | |
import shutil | |
# function to find missing disk in block dict | |
def missingDisk(minDisk, maxDisk, blockDict): | |
disks = [] | |
for disk in range(minDisk, maxDisk+1): | |
try: | |
blockDict[disk] | |
except: |
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 exifread | |
import shutil | |
import os | |
for f in os.listdir("images/"): | |
if not os.path.isfile("images/"+f): | |
continue | |
fb = open("images/"+f, "rb") | |
tags = exifread.process_file(fb) |
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 | |
START=6100 | |
KEYWORD=$1 | |
for i in {1..2000}; do | |
if [ $(($i%100)) -eq 0 ]; then | |
echo "Currently at: $i" | |
fi |
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 | |
import re | |
class debug_inserter(object): | |
def __init__(self, path_to_files, prefix): | |
self.path_to_files = path_to_files | |
self.debug_prefix = prefix | |
self.debug_statement = """const-string {0}, \"{1} - {2}\" | |
invoke-static {{0}, {0}}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I""" | |
self.re_filename = re.compile("\.smali$") |