Skip to content

Instantly share code, notes, and snippets.

class HelloWorldJob: IJob {
public HelloWorldJob() {}
public void Execute(IJobExecutionContext context) {
try {
Console.WriteLine("Hi!-");
} catch (Exception ex) {}
}
}
Ext.define('Ext.toolbar.PagingComboToolbar', {
extend: 'Ext.PagingToolbar',
displayInfo: false,
pageSize: 50,
initComponent: function() {
var me = this;
this.store.pageSize = this.pageSize;
var combo = new Ext.form.ComboBox({
name: 'perpage',
width: 75,
Powershell.exe .\test.ps1 -parameter1 'HELLO FROM PARAMETER 1' -parameter2 'HELLO FROM PARAMETER 2'
Powershell.exe .\test.ps1 -parameter1 "HELLO FROM PARAMETER 1" -parameter2 'HELLO FROM PARAMETER 2'
set /p DUMMY=Hit ENTER to continue...
Get-ChildItem [
[-Path] <String[]> ]
[[-Filter] <String>]
[-Exclude <String[]>]
[-Force]
[-Include <String[]>]
[-Name]
[-Recurse]
[-UseTransaction]
[<CommonParameters>]
param([string]$fileName='')
$content = Get-Content $fileName
foreach ($line in $content)
{
Write-Host $line
$scriptPath = '.\FileWithContentGenerator.ps1'
invoke-expression "$scriptPath $line"
}
param([string]$cultureName='')
$localePath=C:\Users\hbulens\Desktop\test\{0}.js -f $cultureName
$localeTemplate = "@
Ext.onReady(function() {
if (Ext.util && Ext.util.Format) {
Ext.apply(Ext.util.Format, {
thousandSeparator: '.',
decimalSeparator: ',',
currencySign: 'R',
$configFiles = Get-ChildItem . *.js -rec
foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Foreach-Object { $_ -replace "TextToFind", "TextToReplaceBy" } |
Set-Content $file.PSPath
}
$configFiles = Get-ChildItem . *.js -rec
foreach ($file in $configFiles)
{
Write-Host $file.Name
}
private T GetStravaData < T > (string url) {
try
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
using(WebResponse response = request.GetResponse())
{
using(Stream responseStream = response.GetResponseStream())
{
using(StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
{
public class Athlete
{
[JsonProperty("id")]
public int ? Id {get;set;}
[JsonProperty("resource_state")]
public int ? ResourceState {get;set;}
[JsonProperty("profile_medium")]
public string ProfileMedium {get;set;}