Skip to content

Instantly share code, notes, and snippets.

View naiduv's full-sized avatar
☺️

Venkat Naidu naiduv

☺️
View GitHub Profile
@naiduv
naiduv / gist:ca2c18723bf386866bfcf34d748fa7cc
Created May 28, 2021 13:54
Fix for Visual studio 2019 error unable to connect to iis express
1) Do Clean Solution in Visual Studio 2019
2) Close Visual Studio 2019
3) do "git clean -fdx" on commandline (this deletes untracked files from the repo, so be careful! maybe just deleting the hidden .vs folder is good enough too)
4) delete the "properties\launchsettings.json" file.
@naiduv
naiduv / kubectl coolz
Last active February 9, 2021 15:04
running stuff in kubernetes
#https://medium.com/@pczarkowski/kubernetes-tip-run-an-interactive-pod-d701766a12
#https://gist.github.com/so0k/860b570276a86adc38b75cb859bf4c16
#create alpine pod
kubectl -n default run --generator=run-pod/v1 --image=alpine -it alpine-shell --restart=Never -- /bin/sh
#to exit the pod
ctrl-p, ctrl-q
#sh back into the pod
cd /tmp/
curl -L https://github.com/derailed/k9s/releases/download/0.5.2/k9s_0.5.2_Linux_x86_64.tar.gz | tar zx
sudo mv k9s /usr/bin
@naiduv
naiduv / powershell_cd_minus.md
Last active August 24, 2019 12:24
powershell cd to $oldpwd - how to use cd minus in powershell

In powershell cd is an alias of set-location

get-command cd

That is set-location performs the same operations as cd.

Out of the box, set-location does not provide the minus functionality that takes us to the previous working directory.

To modify cd, we have to first remote the alias to set-location:

@naiduv
naiduv / gist:0a88cc577c253aca3ddb648d81b1f3aa
Last active June 25, 2019 13:28
git diff all local branches for a line in a file
#searches all local branches
git branch | cut -d" " -f 3 | grep -Ev "^$" | while read line; do git diff $line <replace_with_file_path>; done | grep <replace_with_search_string>
#example:
#search diffs in all branches in the packages.json file (at the root of current directory) for the term "debug"
git branch | cut -d" " -f 3 | grep -Ev "^$" | while read line; do git diff $line package.json; done | grep debug
@naiduv
naiduv / angular.md
Last active April 30, 2016 12:58
angluar stuff

The ng-app directive defines an AngularJS application.

The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.

The ng-bind directive binds application data to the HTML view.

<div ng-app="">
 	<p>Name: <input type="text" ng-model="name"></p>
 	<p ng-bind="name"></p>
@naiduv
naiduv / YourApiController.cs
Last active April 23, 2016 12:01
Code for setting up basic authentication for an asp.net webapi 2 webservice (like azure mobile app or mobile service)
public class yourApiController: ApiController
{
//Add this to any controller or action that needs authorization
[IdentityBasicAuthentication]
[Authorize]
public action(){}
}
@naiduv
naiduv / elastic_search.md
Last active April 13, 2016 00:53
How to install and run Elastic Search on windows

##Installing Elastic Search on Windows

Step 0) Download and install Java

    Make sure that you have an Environment variable for [JAVA_HOME](https://www.google.com/webhp?sourceid=chrome-instant&rlz=1C1CHFX_enUS649US649&ion=1&espv=2&ie=UTF-8#q=setting+java_home+windows)
    
    Also, you will need to add and environment variable for _JAVA_OPTIONS with a value of -Xmx512M

Step 1) Download the zip for Elastic Search

//as you have already seen in azure portal, there is a snippet that they provide in order to post items from the app to the mobile service.
//its pretty close to what is needed, but it DOES NOT WORK
//after much searching, the following code is an alternative that I have found to work.
public class SomeActivity {
private MobileServiceClient mClient;
private MobileServiceTable<ToDoItem> mToDoTable;
//THIS IS WHAT NEEDS TO CHANGE!! MAKE SURE IT LOOKS LIKE THIS
3/30/2016
=========
DnYontz.github.io
Crawli7381.github.io
Mstamp9999.github.io
dates:
http://www.w3schools.com/js/js_dates.asp
input forms:
http://www.w3schools.com/tags/tag_form.asp