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
hdparm --user-master u --security-set-pass PasSWorD /dev/sdX | |
hdparm --user-master u --security-erase PasSWorD /dev/sdX |
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
def gen_redis_proto(*args): | |
proto = '' | |
proto += '*' + str(len(args)) + '\r\n' | |
for arg in args: | |
proto += '$' + str(len(arg)) + '\r\n' | |
proto += str(arg) + '\r\n' | |
return proto |
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
def power(base, exp): | |
""" Fast power calculation using repeated squaring """ | |
if exp < 0: | |
return 1 / power(base, -exp) | |
ans = 1 | |
while exp: | |
if exp & 1: | |
ans *= base | |
exp >>= 1 | |
base *= base |
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 python3 | |
import urllib.request | |
import re | |
import ssl | |
import sys | |
# # find generic mirrors | |
mirrors = urllib.request.urlopen('http://www.debian.org/mirror/list') | |
https = [] |
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
0.0.0.0 api.surfeasy.com | |
0.0.0.0 opera-proxy.net | |
0.0.0.0 api.sec-tunnel.com | |
0.0.0.0 sitecheck2.opera.com | |
0.0.0.0 opera-mini.net | |
0.0.0.0 exchange.opera.com | |
0.0.0.0 features.opera-api.com |
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
import logging | |
import logging.handlers | |
log = logging.getLogger(__name__) | |
log.setLevel(logging.DEBUG) | |
handler = logging.handlers.SysLogHandler(address = '/dev/log') | |
formatter = logging.Formatter('%(module)s.%(funcName)s: %(message)s') |
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
package main | |
// https://github.com/dps/go-xml-parse/blob/master/go-xml-parse.go | |
import ( | |
"fmt" | |
"os" | |
"encoding/xml" | |
) |
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
server { | |
listen 80; | |
server_name backend; | |
root /usr/share/nginx/www; | |
index index.html index.html; | |
location / { | |
header_filter_by_lua ' |
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 | |
fricas -nosman <<EOF | |
E := [_ | |
-- Standard Illumination Model for Computers_ | |
--_ | |
-- Is defined as a system of linear equations, where negative_ | |
-- colors don't exist and is solved by computing the point at_ | |
-- which they all intersect the one which needs to be defined_ | |
-- as the Planckian locus of the illuminant._ |
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
image: docker:latest | |
services: | |
- docker:dind | |
stages: | |
- build | |
variables: | |
IMAGE: registry.gitlab.com/bamnet/njtdata | |
DOCKER_CLI_EXPERIMENTAL: enabled |
OlderNewer