Skip to content

Instantly share code, notes, and snippets.

@syaifulnizamyahya
syaifulnizamyahya / AsciidocFX.bat
Created February 8, 2016 05:19
AsciidocFX that fixed Graphviz/plantuml path not found. The path is temporary and isolated so it doesn't make changes to your system.
SET GRAPHVIZ_DOT=D:\Program Files (x86)\Graphviz2.38\bin\dot.exe
REM java -jar "D:\Program Files\AsciidocFX\lib\plantuml-8033.jar" -testdot
AsciidocFX.exe
@syaifulnizamyahya
syaifulnizamyahya / SaveAllWorksheetToCsv.txt
Last active April 23, 2016 00:56
Save all worksheet in Excel as csv
Sub exportcsv()
Dim ws As Worksheet
Dim path As String
' Turn off warnings if the file already exists
Application.DisplayAlerts = False
path = ActiveWorkbook.path & "\" & Left(ActiveWorkbook.Name, InStr(ActiveWorkbook.Name, ".") - 1)
For Each ws In Worksheets
ws.Copy
@syaifulnizamyahya
syaifulnizamyahya / gist:b2a2b9ea7b611abc09ad83a202038dd9
Created August 9, 2016 08:02
Get Dispatcher in Windows 10 UWP
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
() =>
{
// Your UI update code goes here!
}
);
@syaifulnizamyahya
syaifulnizamyahya / ObjectDumper.cs
Last active July 30, 2021 07:53
ObjectDumper for UWP. Use it to quickly get whats inside an object.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using WinRTXamlToolkit.Common;
namespace ObjectDumper
{
//http://stackoverflow.com/questions/852181/c-printing-all-properties-of-an-object
@syaifulnizamyahya
syaifulnizamyahya / wifimodel.cs
Created November 15, 2016 12:50
The name 'Set' does not exist in the current context
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Template10.Mvvm;
using Template10.Services.NavigationService;
This file has been truncated, but you can view the full file.
Dec 18 13:27:18 Tower rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="1411" x-info="http://www.rsyslog.com"] start
Dec 18 13:27:18 Tower kernel: Initializing cgroup subsys cpuset
Dec 18 13:27:18 Tower kernel: Initializing cgroup subsys cpu
Dec 18 13:27:18 Tower kernel: Initializing cgroup subsys cpuacct
Dec 18 13:27:18 Tower kernel: Linux version 4.4.30-unRAID (root@develop64) (gcc version 5.3.0 (GCC) ) #2 SMP PREEMPT Sat Nov 5 12:09:05 PDT 2016
Dec 18 13:27:18 Tower kernel: Command line: BOOT_IMAGE=/bzimage initrd=/bzroot
Dec 18 13:27:18 Tower kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Dec 18 13:27:18 Tower kernel: x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
Dec 18 13:27:18 Tower kernel: x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
Dec 18 13:27:18 Tower kernel: x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers'
var task = Task.Run(async () =>
{
LccParamModel = await GetLeastCongestedChannelParams();
});
task.Wait();
@syaifulnizamyahya
syaifulnizamyahya / Template10.xaml
Last active June 21, 2017 04:07
Template10 xaml
xmlns:Behaviors="using:Template10.Behaviors"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:controls="using:Template10.Controls"
xmlns:vm="using:XXXXX.ViewModels"
<Page.DataContext>
<vm:XXXXXViewModel x:Name="ViewModel" />
</Page.DataContext>
@syaifulnizamyahya
syaifulnizamyahya / UwpNuget
Last active June 15, 2017 22:25
UWP Mush Have Nuget Toolkit
Install-Package WindowsAppStudio.DataProviders
Install-Package WindowsAppStudio.Uwp
Install-Package WindowsAppStudio.Common
Install-Package WindowsAppStudio.Controls -Pre
Install-Package Microsoft.Toolkit.Uwp
Install-Package Microsoft.Toolkit.Uwp.UI
Install-Package Microsoft.Toolkit.Uwp.UI.Animations
Install-Package Microsoft.Toolkit.Uwp.UI.Controls
Install-Package Microsoft.Toolkit.Uwp.Services
@syaifulnizamyahya
syaifulnizamyahya / acmvx.snippet
Last active June 1, 2017 05:13
MvvmCross Code Snippet for Visual Studio
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>MvvmCross async command</Title>
<Description>MvvmCross async command</Description>
<Shortcut>acmvx</Shortcut>
<Author>Syaiful Nizam Yahya (based on Mikkel Jensen)</Author>
<HelpUrl>http://stackoverflow.com/questions/18200679/mvvmcross-code-snippets-for-visual-studio</HelpUrl>