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 '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
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
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
###### 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
#!/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
#!/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 | |
#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
#!/bin/sh | |
#From: https://addhewarman.com/2015/01/23/easiest-way-how-to-get-tag-from-remote-github-repository/ | |
LAST_TAG=$(git ls-remote --tags [email protected]:MY_REPOSITORY/"$MY_PROJECT".git | awk '{print $2}' | grep -v '{}' | awk -F"/" '{print $3}' | tail -n 1) | |
git checkout $LAST_TAG |
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 | |
sudo apt-get update | |
sudo apt-get install autoconf automake build-essential pkgconf libtool git libzip-dev libjpeg-dev checkinstall | |
sudo apt-get install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev | |
sudo apt-get install libjpeg-turbo8 libjpeg-turbo8-dev | |
sudo apt-get install libwebp-dev | |
git clone https://github.com/Motion-Project/motion.git |
NewerOlder