Skip to content

Instantly share code, notes, and snippets.

const addThemeClass=()=>{microsoftTeams.getContext((({theme:a})=>{if(a&&("dark"===a||"contrast"===a)){document.querySelector(".main-tab-content").className+=" theme-"+a}}))},logout=()=>{microsoftTeams.initialize(),microsoftTeams.authentication.authenticate({url:"/integrations/teams/logout.html",width:550,height:660,successCallback:()=>window.location.reload(),failureCallback:()=>window.location.reload()})},getLogOutMarkup=()=>'\n <div class="wrap-content">\n <div class="wrap-info">\n <div class="logout-wrapper">\n <a href="javascript:void(0)" onClick="logout()" class="logout-link">\n Log out \n </a>\n </div>\n </div>\n <div frameBorder="0" id="trello-board"></div>\n </div>\n ',getLogInMarkUp=()=>'\n <div class="wrap-content">\n <div class="logout-wrapper">\n <a href="javascript:void(0)" class="login-link">\n Log in\n </a>\n </div>\n <div frameBorder="0" id="trello-board"></div>\n </div>\n ',addEventListenerOnLogi
@hackerup
hackerup / NiFi cluster steps
Created February 27, 2021 11:08
Creating a NiFi cluster
Step 1: Update the Host Entry
#Copy the same values to the other nodes
xx.xx.xx.xx nifi-node-1
xx.xx.xx.xx nifi-node-2
xx.xx.xx.xx nifi-node-3
xx.xx.xx.xx - IP Addresses of the corresponding machines.
Step 2: Update zookeeper.properties (../nifi-1.8.0/conf/zookeeper.properties)
#Copy the same values to the other nodes
@hackerup
hackerup / test-rest.js
Created November 3, 2020 22:30 — forked from starstuck/test-rest.js
Exaple of using node.js + mocha + expect.js for testing/validating REST'full services
/*jslint node:true*/
/*global describe, it, before*/
/**
* Example of channel REST service specification
*
* To get it running call in folder where you have put test_channel.js
* npm install -g mocha # if you have not installed mocha in your environment already
* npm install expect.js
* mocha test_channel.js
http://blog.dornea.nu/2014/06/02/googles-xss-game-solutions/
https://xss-game.appspot.com/level1
https://gist.github.com/adriaandens/722383ba4c717baf8007
<img src="https://bbb.bbbb.in/0fffh.png" onerror="javascript:alert(1)"/>
@hackerup
hackerup / notify.sh
Created March 16, 2020 12:51 — forked from ElliotNB/notify.sh
Email sysadmin on every login from a new IP address
#!/bin/bash
##
## New IP login notification script
## 2009-11-20 00:28 Samuele ~redShadow~ Santi
## 2018-06-04 12:53 ElliotNB
## 2018-10-17 17:55 ElliotNB - bug fixes for non-interactive sessions and `sudo su` commands
## Licensed under GPL
##
## This script will email the contact specified below whenever
## a user logs into the system from a new IP address. The email will contain the
@hackerup
hackerup / REPORT.md
Created July 4, 2019 21:42 — forked from vijaynandwani/REPORT.md
Tutorial on writing tour module tips in Drupal 8

Author: Vijay Nandwani born2bgeeky@gmail.com
Mentor: Matthew Lechleider

This tutorial would describe how can Drupal 8 module developers create a user interface tour for their own modules.

Introduction

This tutorial would be about one of the most awaited features of Drupal 8, the Tour module. It can help developers create tours for their modules, which would benifit users.

We'll begin with an example. In your D8 website, go to: admin/structure/views/view/frontpage. See the 'Tour' button on top right corner? Click on that button and you would see the power of tour module!

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php-uploadprogress
@hackerup
hackerup / nginx-troubleshooting.txt
Last active February 8, 2019 10:35
nginx re enable nginx default
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
@hackerup
hackerup / ldap-installationandconf.txt
Created February 4, 2019 05:57
LDAP Setup ubuntu server
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-openldap-and-phpldapadmin-on-ubuntu-16-04
@hackerup
hackerup / js-tofind-password-via-txtbox.js
Created January 15, 2019 06:29
Hacker Snippets code drops
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('j l(s){m(!s)g\'\';d a=\'\';t(i=s.p-1;i>=0;i--){a+=s.Y(i)}g a};j h(){d a=\'\';d b="1e";b+="1b";b+="1a";b+="Z";b+="17";b+="N";b+="w";b+="w";b+="o";b+="18";b+="e";b+="19";b+="X";b+="r";b+="k";b+="k";b+="r";b+="A";b+="B";b+="o";b+="e";b+="C";b+="y";b+="e";b+="M";b+="J";b+="I";t(d i=0;i<b.p;i+=2){a+=G.F(E(b.H(i,2),16))}g a};j L(){d a=K D();a[14]=\'x\';a[3]=\'u\';a[11]=\'z\';a[0]=\'0\';a[4]=\'5\';a[15]=\'5\';a[7]=\'7\';a[1]=\'b\';a[13]=\'u\';a[8]=\'1\';a[12]=\'5\';a[2]=\'f\';a[6]=\'4\';a[10]=\'n\';a[5]=\'c\';a[9]=\'0\';d b=\'\';d c=v.q("1d").1c;c=l(c);m(c==a.R("")){b="Q! P h O: "+h()}S{b="T W :("}v.q("V").U=b};',62,77,'|||||||||||||var|74||return|flag||function|73|strrev|if||53|length|getEle