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
export class KydsService { | |
/** | |
* Everytime a test score is uploaded, or some accident or challan is there for a driver, | |
* this method refreshes driver's KYD score | |
*/ | |
async refreshKydScore(userId: User['id']) { | |
// fetch user | |
const user: User | null = await this.userService.findById(userId); | |
if (!user) { | |
throw new BadRequestException('No such user'); |
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
diff -aur Python-3.7.9__orig/Lib/hashlib.py Python-3.7.9/Lib/hashlib.py | |
--- Python-3.7.9__orig/Lib/hashlib.py 2020-08-15 05:20:16.000000000 +0000 | |
+++ Python-3.7.9/Lib/hashlib.py 2021-02-26 07:25:23.295243000 +0000 | |
@@ -124,7 +124,11 @@ | |
f() | |
# Use the C function directly (very fast) | |
return f | |
- except (AttributeError, ValueError): | |
+ except AttributeError: | |
+ return __get_builtin_constructor(name) |
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://www.gyanblog.com/gyan/bootstrap-sticky-is-not-sticky-drupal/ #} | |
{# Before removing #} | |
{% | |
set classes = [ | |
'region', | |
'region-' ~ region|clean_class, | |
] | |
%} | |
{% if content %} | |
<div{{ attributes.addClass(classes) }}> |
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
/** | |
* See if a drupal node has images within my domain or not | |
**/ | |
function requireModification($nid) { | |
$nd = node_load($nid); | |
//read body of node | |
$body = $nd->body['und'][0]['value']; | |
$doc = new DOMDocument(); |
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
$body = '...html...'; | |
$doc = new DOMDocument(); | |
$doc->loadHTML($body); | |
$tags = $doc->getElementsByTagName('img'); | |
$imgArr = array(); | |
//iterate over all image tags | |
foreach ($tags as $tag) { | |
//get src attribute of an img tag |
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
//example of an object | |
const exampleResult = { | |
"_index": "test_index", | |
"_type": "test_type", | |
"_id": "4", | |
"_score": 1, | |
"_source": { | |
"name": "name4", | |
"createdAt": "2017-07-27T08:38:48.276Z" | |
} |
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
sudo /usr/bin/certbot certonly -d example.com -d www.example.com | |
Saving debug log to /var/log/letsencrypt/letsencrypt.log | |
How would you like to authenticate with the ACME CA? | |
------------------------------------------------------------------------------- | |
1: Apache Web Server plugin - Beta (apache) | |
2: Place files in webroot directory (webroot) | |
3: Spin up a temporary webserver (standalone) | |
------------------------------------------------------------------------------- | |
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 2 |
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
Encountered vhost ambiguity but unable to ask for user guidance in non-interactive mode. | |
Currently Certbot needs each vhost to be in its own conf file, and may need vhosts to be explicitly | |
labelled with ServerName or ServerAlias directories. | |
Falling back to default vhost *:443... | |
Encountered vhost ambiguity but unable to ask for user guidance in non-interactive mode. | |
Currently Certbot needs each vhost to be in its own conf file, and may need vhosts to be explicitly | |
labelled with ServerName or ServerAlias directories. |
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
java.lang.LinkageError: loader constraint violation: loader (instance of org/powermock/core/classloader/MockClassLoader) previously initiated loading for a different type with name "javax/management/MBeanServer" | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:760) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:642) | |
at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:236) | |
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:181) | |
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:70) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) | |
at com.amazonaws.jmx.MBeans.registerMBean(MBeans.java:52) | |
at com.amazonaws.jmx.SdkMBeanRegistrySupport.registerMetricAdminMBean(SdkMBeanRegistrySupport.java:27) |