Skip to content

Instantly share code, notes, and snippets.

View darzo27's full-sized avatar

D K darzo27

  • Johannesburg, South Africa
View GitHub Profile
@darzo27
darzo27 / IdentityNow-ElasticSearch
Last active July 13, 2022 08:40
SailPoint IdentityNow - Retrieve 10k+ results from IDN API.
#region IDN functions
function IdentitiesSearchAfter($token, $query, $searchAfterID, $limit, $IDNdisplayNameSearch)
{
#region IDN Search Queries
$identitySearchqry = "{`"query`": {`"query`": `"source.name:HR`")`"},`"indicies`": [`"identities`"],`"queryResultFilter`": {`"includes`": [`"attributes.uid`",`"attributes.displayName`",`"attributes.identificationNumber`",`"id`",`"status`",`"isManager`"]},`"sort`": [`"+id`"],`"includeNested`": false,`"searchAfter`": [`"$($searchAfterID)`"]}"
#eventSearchQry - have multiple queries that can be used, reuse the same logic to fetch 10k+ results
#endregion IDN Search Queries
$body = switch ($query)
{
Get-Process | Group-Object ProcessName | ForEach-Object {
$_ | Select-Object -ExpandProperty Group | Select-Object -First 5
}
__________________________________________
Get-ADComputer -Filter * | foreach-object {
$Computer = $_.Name
To bind the inner HTML of any HTML element to a variable value you can use:
- `ng-bind-html` Directive and pass a variable or expression to it (using variables, literals & operators).
> Try it here: [JSFiddle](https://jsfiddle.net/DARZO27/01q4jeht/2/ )
<script async src="//jsfiddle.net/DARZO27/01q4jeht/2/embed/js,html,css,result/dark/"></script>
<div ng-app="myApp" ng-controller="myCtrl">
@darzo27
darzo27 / TwitterTimeline
Created August 2, 2017 15:01
Displaying User Twitter Timeline in div element
<html>
<!-- Twitter’s widgets JavaScript For optimal web page performance & tracking widget JS events -->
<script>window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
@darzo27
darzo27 / AngularHTMLBinding.html
Created April 7, 2017 22:05
Angular 2 HTML binding using expressions. View on JSFiddle: https://jsfiddle.net/DARZO27/01q4jeht/2/
<!--View on JSFiddle: https://jsfiddle.net/DARZO27/01q4jeht/2/-->
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-sanitize.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind-html="myText"></p>
package dijkstrasAlg;
import org.junit.Test;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.assertEquals;
@darzo27
darzo27 / CalcAngleofLineBetweenTwoPoints
Last active June 20, 2023 21:14
Calculate Angle of Line between two points - Java, C#, Python
==== J A V A ==================================
/**
* Determines the angle of a straight line drawn between point one and two. The number returned, which is a double in degrees, tells us how much we have to rotate a horizontal line clockwise for it to match the line between the two points.
* If you prefer to deal with angles using radians instead of degrees, just change the last line to: "return Math.atan2(yDiff, xDiff);"
*/
public static double GetAngleOfLineBetweenTwoPoints(Point.Double p1, Point.Double p2)
{
double xDiff = p2.x - p1.x;
double yDiff = p2.y - p1.y;
return Math.toDegrees(Math.atan2(yDiff, xDiff));
@darzo27
darzo27 / Rainbowy Dashed Divider.markdown
Last active May 7, 2024 07:35
Rainbowy Dashed Divider
@darzo27
darzo27 / intellij-monokai-theme.xml
Created March 27, 2016 18:23 — forked from darekkay/intellij-monokai-theme.xml
Monokai Theme for IntelliJ
<scheme name="Eclectide Monokai" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ADDED_LINES_COLOR" value="295622" />
<option name="CARET_COLOR" value="bbbbbb" />
<option name="CARET_ROW_COLOR" value="" />
<option name="CONSOLE_BACKGROUND_KEY" value="272822" />
<option name="FILESTATUS_ADDED" value="629755" />