All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
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
# thx to alfred (https://github.com/alfredbez) for sharing | |
# add to modules/functions.php | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; | |
function getLogger() { |
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 | |
# Licensed by author Alex Birch under CC BY-SA 4.0 | |
# https://creativecommons.org/licenses/by-sa/4.0/ | |
# detects whether any of your passwords have been exposed in a data breach, by | |
# submitting (prefixes of hashes of) all your passwords to Troy Hunt's | |
# Pwned Passwords API. | |
# https://haveibeenpwned.com/Passwords |
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 sys | |
import pyinsane2 | |
pyinsane2.init() | |
try: | |
devices = pyinsane2.get_devices() | |
assert(len(devices) > 0) | |
device = devices[0] | |
print("I'm going to use the following scanner: %s" % (str(device))) |
docker exec -i mysql_container mysqldump -uroot -proot --databases database_name --skip-comments > /path/to/my/dump.sql
- This will generate a
dump.sql
file in your host machine. Awesome, eh? - Avoid using
--compact
on your dump. This will make MySQL check your constraints which will cause troubles when reading your file (damm you MySQL). And don't use--force
to fix this scenario: recreate your dump without--compact
¯_(ツ)_/¯
Here are my attempts to script an IntelliJ-based IDE using javax.script.*
API (ex-JSR-223).
The list of available scripting languages and engines:
- Groovy - built-in, via Groovy jars and
<app>/lib/groovy-jsr223-xxx.jar
- JavaScript (Nashorn) - built-in, via Java Runtime
<app>/jbr/...
(deprecated and will be removed soon) - JavaScript (GraalJS) - https://plugins.jetbrains.com/plugin/12548-intellij-scripting-javascript
- JPython - https://plugins.jetbrains.com/plugin/12471-intellij-scripting-python
- JRuby - https://plugins.jetbrains.com/plugin/12549-intellij-scripting-ruby
- Clojure - https://plugins.jetbrains.com/plugin/12469-intellij-scripting-clojure
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 functools import partial | |
class partialmethod(partial): | |
def __get__(self, instance, owner): | |
if instance is None: | |
return self | |
return partial(self.func, instance, | |
*(self.args or ()), **(self.keywords or {})) |
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
<?php | |
const ✓ = true; | |
const ✕ = false; | |
function ≠($left, $right) { | |
return $left != $right; | |
} | |
function ≅($left, $right) { |
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
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
NewerOlder