Skip to content

Instantly share code, notes, and snippets.

View darknoon29's full-sized avatar

Anthony darknoon29

View GitHub Profile
# Gives Azure Active Directory read permission to a Service Principal representing the SQL Managed Instance.
# Can be executed only by a "Global Administrator" or "Privileged Role Administrator" type of user.
$aadTenant = "<YourTenantId>" # Enter your tenant ID
$managedInstanceName = "MyManagedInstance"
# Get Azure AD role "Directory Users" and create if it doesn't exist
$roleName = "Directory Readers"
$role = Get-AzureADDirectoryRole | Where-Object {$_.displayName -eq $roleName}
if ($role -eq $null) {
@darknoon29
darknoon29 / set_ogspy_rights.sh
Created March 6, 2020 14:56
Set OGSpy File Rights
#!/bin/sh
OGSPY_FOLDER="/srv/www/ogspy.fr/ogspy337"
if [ -f "$OGSPY_FOLDER/lang/lang_main.php" ]
then
echo "Setting OGSpy Rights"
chmod -R 755 $OGSPY_FOLDER
@darknoon29
darknoon29 / gist:52865858b439647452ca7c8ef2fefb7c
Last active August 1, 2019 08:30
Git Repository Clean up using .gitignore
Clean Up Local Repository
git clean -xdf --dry-run (Remove dry-run when first command ok)
or
Clean Up Local and remote Repository (Unix shell Required here)
git ls-files -i --exclude-from=.gitignore | xargs git rm --cached
@darknoon29
darknoon29 / gist:8ccfa129ff27e146ccd22bec2bd460b2
Created April 18, 2019 20:16 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote

Keybase proof

I hereby claim:

  • I am darknoon29 on github.
  • I am darknoon (https://keybase.io/darknoon) on keybase.
  • I have a public key ASB_6s8wMB2qltzwuxj5EH0S-nncNna2Zeld77mip5ulhwo

To claim this, I am signing this object:

@darknoon29
darknoon29 / user_status.sh
Last active March 6, 2017 21:17
OGSpy User Status
#!/bin/sh
#Script permettant de connaitre l'utilisation des sites
# Informations à compléter
pass_mysql_root="boubou"
#username="allyu68"
for username in `ls -1d /home/* | sed 's/\/home\///'`
do
echo "############$username##############"
mysql -u root -p"$pass_mysql_root" -D "$username" -e "SELECT user_name ,FROM_UNIXTIME(user_lastvisit) FROM ogspy_user WHERE user_id=1;SELECT config_value FROM ogspy_config WHERE config_name='version';"
#Taille Répertoire
Récupération de la machine:
1 .A partir du dépot OGSpy
docker build -t ogsteam/ogspy .
ou à partir de docker hub:
docker pull darknoon29/ogspy
Jack Error 41:
Fix with : chmod 777 ~/.jack
CLANG Issue to compile ART:
Fix with : http://review.cyanogenmod.org/#/c/120824/2/build/Android.common_build.mk
Ou
https://android-review.googlesource.com/c/223100/1/core/clang/HOST_x86_common.mk