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/bash | |
#Tested with Pi-Hole v.4 | |
PI_HOST=localhost | |
echo "Checking Pi-Hole status" | |
curl http://$PI_HOST/admin/api.php?summary 2>/dev/null | grep '"status":"enabled"' > /dev/null | |
if [ $? -eq 0 ]; then |
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/python3 | |
''' | |
Copyright 2018 Andrea Cioni | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the 'Software'), | |
to deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom the Software is |
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/bash | |
git add . | |
git status | |
echo "Hit return to continue..." | |
read |
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
###### FIND #### | |
> Execute a command on every subfolder | |
find -D exec -maxdepth 1 -type d -name "my/directory" -print -exec COMMAND \; | |
####################### SYSTEMD ####################### | |
> Reload service configuration |
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 | |
import ( | |
"C" | |
"fmt" | |
"log" | |
"net/http" | |
"net/url" | |
"strings" | |
"unsafe" |
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
emptyTarget(val) { | |
return val is List ? [] : {}; | |
} | |
dynamic cloneUnlessOtherwiseSpecified(value) { | |
print('$value'); | |
return isMergeableObject(value) | |
? deepmerge(emptyTarget(value), value) | |
: value; | |
} |
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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override |
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
@Get('api/auth/sso/saml/login') | |
@UseGuards(SamlAuthGuard) | |
async samlLogin() { | |
//this route is handled by passport-saml | |
return; | |
} |
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 { KafkaJS } from '@confluentinc/kafka-javascript'; | |
import { SchemaRegistryClient } from '@confluentinc/schemaregistry'; | |
import { DynamicModule, Provider } from '@nestjs/common'; | |
import { HealthIndicatorService } from '@nestjs/terminus'; | |
import { KafkaHealthIndicator } from './kafka.health-indicator'; | |
import { KafkaMetricsProvider } from './kafka.metrics'; | |
import { | |
KafkaAdminClientOptions, | |
KafkaConnectionOptions, | |
KafkaConsumerOptions, |
OlderNewer