This file contains hidden or 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
| | makeresults | |
| | eval _raw="{ \"Name\": \"This is a name\", | |
| \"Items\": [ | |
| { | |
| \"path\": \"The 1 path\" | |
| }, | |
| { | |
| \"path\": \"The 2 path\" | |
| }, | |
| { |
This file contains hidden or 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 the url from the download link in your GitHub repo under Code > Download ZIP | |
| $url = 'https://github.com/YOUR_ORG/YOUR_REPO/archive/refs/heads/master.zip' | |
| $wc = New-Object -TypeName System.Net.WebClient | |
| $wc.Headers.Add('Authorization','token YOUR_GITHUB_PERSONAL_ACCESS_TOKEN') | |
| $wc.DownloadFile($url,'/PATH_TO/master.zip') | |
| Expand-Archive /PATH_TO/master.zip /PATH_TO/master |
This file contains hidden or 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
| fetch("/api/foo").then( response => { | |
| if (!response.ok) { throw response } | |
| return response.json() //we only get here if there is no error | |
| }) | |
| .then( json => { | |
| this.props.dispatch(doSomethingWithResult(json)) | |
| }) | |
| .catch( err => { | |
| if (err.text) { | |
| err.text().then( errorMessage => { |
This file contains hidden or 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 React from 'react'; | |
| import Container from 'react-bootstrap/Container'; | |
| import Pagination from 'react-bootstrap/Pagination'; | |
| class PageControl extends React.Component { | |
| render() { | |
| let active = this.props.currentPage; | |
| let items = []; | |
| // the layout... |
This file contains hidden or 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
| REM ## Renoise Launcher for Windows-based systems ## | |
| REM See http://goo.gl/XxQHmW for details | |
| REM Specify the name of 'your' config.xml - one for each instance | |
| set my_config="Config1.xml" | |
| REM Set codepage to UTF (required if your username contains special characters) | |
| chcp 65001 | |
| REM Set up our paths - depends on OS & installed version of Renoise |
This file contains hidden or 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
| If you like to return multiple values from a function, simply populate a hash table variable in function and return the variable. See my example below. Feel free to use my example function and Enjoy. | |
| Function Get-UserInfo($username) | |
| { | |
| #Create an hashtable variable | |
| [hashtable]$Return = @{} | |
| Import-Module ActiveDirectory |
This file contains hidden or 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 | |
| # Debug mode 0 = off, 1 = on | |
| blnDebugMode="1" | |
| strLogFolderPath="/var/log/temptestlogs" | |
| # INITIAL VARIABLES | |
| intMinutesTillNewLogFile="1" | |
| intWriteFrequencyInSeconds="1" | |
| strLogText="This is a line" |
This file contains hidden or 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
| #Linux folder sizes | |
| du -sh /* | |
| #I often need to find the biggest directories, so to get a sorted list containing the 20 biggest dirs I do this: | |
| du -m /some/path | sort -nr | head -n 20 |
This file contains hidden or 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
| ' Purpose: Complete uninstall of 6.x Altiris agent | |
| ' Reference: https://kb.altiris.com/article.asp?article=1995&p=1 | |
| ' Created: 5/17/2010 | |
| ' Modified: 5/20/2010 | |
| ' Author: Steven Riggs | |
| Option Explicit | |
| On Error Resume Next |
This file contains hidden or 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
| 'This script forces the Altiris Agent on a remote computer to | |
| 'update its configuration from the Notification Server | |
| ' | |
| 'Revised 03/23/11 by Steven Riggs | |
| 'Example: cscript.exe RemoteAltirisUpdate.vbs somecomputername | |
| 'Or doubleclick on the vbs file to get an input box | |
| Option Explicit |
NewerOlder