update QRTZ_TRIGGERS set next_fire_time = (select unix_timestamp(date_add(now(), interval 1 minute)) * 1000) where job_name = 'myJob';
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
# Assuming 'base.rb' contains a seed dump (https://github.com/rroblak/seed_dump) | |
# Disable validations | |
ApplicationRecord.class_eval do | |
def valid?(a=1) | |
true | |
end | |
end | |
# Not sure if the transactional code is needed... |
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 java.io.File; | |
import java.util.*; | |
import java.lang.management.BufferPoolMXBean; | |
import java.lang.management.ManagementFactory; | |
import javax.management.MBeanServerConnection; | |
import javax.management.ObjectName; | |
import javax.management.remote.*; | |
import com.sun.tools.attach.VirtualMachine; // Attach API |
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
https://auth0.com/blog/id-token-access-token-what-is-the-difference/ | |
"One of the most common mistakes developers make with an ID token is using it to call an API." | |
But in ASP.NET: | |
https://docs.microsoft.com/es-es/dotnet/api/microsoft.extensions.dependencyinjection.jwtbearerextensions.addjwtbearer?view=aspnetcore-6.0 | |
Enables JWT-bearer authentication using the default scheme AuthenticationScheme. | |
"JWT bearer authentication performs authentication by extracting and validating a JWT token from the Authorization request header." | |
https://curity.io/resources/learn/jwt-best-practices/#1-jwts-used-as-access-tokens |
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
# noop | |
puppet agent --no-daemonize --verbose --onetime --pluginsync --test --noop | |
# real | |
puppet agent --no-daemonize --verbose --onetime --pluginsync --test |
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
codesign --force --deep --sign - Eclipse.app |
Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.
plain Git, aka git://github.com/
-
Does not add security beyond what Git itself provides. The server is not verified.
If you clone a repository over git://, you should check if the latest commit's hash is correct.
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
# one or the other, NOT both | |
[url "https://github"] | |
insteadOf = git://github | |
# or | |
[url "[email protected]:"] | |
insteadOf = git://github |
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 | |
# Merge pages from a1 and a2 into b | |
qpdf --empty --pages a1.pdf 1-z a2.pdf 1-z -- b.pdf | |
# Merge pages from a* into b | |
qpdf --empty --pages $(for i in a*.pdf; do echo $i 1-z; done) -- b.pdf | |
# Remove password | |
qpdf -password=mypassword -decrypt source_with_password.pdf target_without_password.pdf |
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/sh | |
# Script provided by http://www.linuxfromscratch.org/blfs/view/svn/general/openjdk.html#ojdk-certs | |
# EB 20141217: removed bashisms | |
# Simple script to extract x509 certificates and create a JRE cacerts file. | |
get_args() | |
{ | |
if test -z "${1}" ; then | |
showhelp | |
exit 1 |
NewerOlder