Skip to content

Instantly share code, notes, and snippets.

@iraSenthil
iraSenthil / cloudSettings
Last active December 21, 2018 16:55
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-12-21T16:55:44.238Z","extensionVersion":"v3.2.4"}
@iraSenthil
iraSenthil / gist:0c695cd0719e7f350f703921b8a61fdc
Created September 21, 2017 17:11
Debug neutrino or node module
Run this where package.json is located.
node --inspect-brk .\node_modules\neutrino\bin\neutrino start --use .\.neutrino.js
Go to http://127.0.0.1:9229/json/list and copy value in devtoolsFrontendUrl
See this for more information. https://nodejs.org/en/docs/guides/debugging-getting-started/
function main()
{
function1 hello
function2 world
}
# If you call the main function here, You will get an error. It hasn't parsed function1 and function2 functions yet
function function1($arg)
{
echo "function1:$arg"
}
Start-Process "firefox.exe" "www.google.com"
Start-Process "iexplore.exe" "www.google.com"
Start-Process "chrome.exe" "www.google.com"
#Or Use .Net API to open application
[System.Diagnostics.Process]::Start("firefox.exe","www.google.com")
[System.Diagnostics.Process]::Start("iexplore.exe","www.google.com")
[System.Diagnostics.Process]::Start("chrome.exe","www.google.com")
start firefox.exe www.google.com
start iexplore.exe www.google.com
start chrome.exe www.google.com
$files = ls -Recurse | where {!$_.PsIsContainer}
$files | foreach {
$destinationFolder = $_.Directory.FullName -replace "SrcFolderName", "SrcFolderName_converted"
emf2sf.bat $_.FullName --out-dir $destinationFolder
if($LastExitCode -eq 2)
{
copy $_.FullName $destinationFolder
}
}
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid
android:color="#449def" />
<stroke
android:width="1dp"
android:color="#2f6699" />
<corners
package com.example.runkeeperapi;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
public class MainActivity extends Activity implements OnClickListener {
private Button button;
private WebView webView;
private final static String CLIENT_ID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private final static String CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private final static String CALLBACK_URL = "com.example.runkeeperapi://RunKeeperIsCallingBack";
@SuppressLint("SetJavaScriptEnabled")
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.runkeeperapi"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="8"