Skip to content

Instantly share code, notes, and snippets.

View AshV's full-sized avatar
🌴
Coding @ Maldives Beaches

Ashish Vishwakarma AshV

🌴
Coding @ Maldives Beaches
View GitHub Profile
@drizzentic
drizzentic / index.php
Created July 19, 2016 14:20
Sample USSD Application
<!-- MIT License
Copyright (c) 2016 Derrick Rono
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Landish
Landish / git.md
Last active September 4, 2017 05:51
GIT Tips & Tricks

Change Remote URL

$ git remote set-url origin <remote_repo>

Discard Unstaged/Untracked Changes

$ git checkout -- .
$ git reset --hard
@gkastrinis
gkastrinis / post2.md
Last active November 15, 2022 15:43
Tablet as second PC monitor

Tablet as second PC monitor

Lately I've been thinking about using my old nexus 7 (from 2012) as a second PC monitor.

I've read articles regarding android apps for this purpose as well as comments from Google Play. Some examples can be found here and here. Bottom line, you have to pay and most likely you will end up struggling with (huge?) lag and/or compatibility issues. I tried splashtop but it felt lacking in some way, it was just mirroring my main monitor and it was free just for the first 5 minutes.

@augustoproiete
augustoproiete / SimpleHttpServer.cs
Created December 20, 2015 20:50
C# Based HttpListener Static File Web Server
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Net;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Westwind.Utilities;
namespace Westwind.WebConnection
@devigned
devigned / powershell-and-versions.ps1
Created October 5, 2015 06:52
PowerShell and System.Version Examples.
# Not all of these things are the like the others...
# The last version of this usage will leave you in sadness if you don't catch it.
New-Object System.Version("0.1.1")
# Major Minor Build Revision
# ----- ----- ----- --------
# 0 1 1 -1
New-Object System.Version(0, 1, 1)
# Major Minor Build Revision
@LindaLawton
LindaLawton / GoogleDriveServiceAccountcsharp
Created July 22, 2015 07:22
accessing google drive with a service account and C#
string[] scopes = new string[] {DriveService.Scope.Drive}; // Full access
var keyFilePath = @"c:\file.p12" ; // Downloaded from https://console.developers.google.com
var serviceAccountEmail = "xx@developer.gserviceaccount.com"; // found https://console.developers.google.com
//loading the Key file
var certificate = new X509Certificate2(keyFilePath, "notasecret", X509KeyStorageFlags.Exportable);
var credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(serviceAccountEmail) {
Scopes = scopes}.FromCertificate(certificate));
@stevenswafford
stevenswafford / google-dorks
Created June 6, 2015 05:57
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@DanDiplo
DanDiplo / JS-LINQ.js
Last active April 29, 2024 10:30
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@prasanthj
prasanthj / chrome-ext-tab-url.js
Created December 15, 2014 20:00
Chrome extension get tab url
chrome.tabs.query({'active': true, 'lastFocusedWindow': true, 'currentWindow': true}, function (tabs) {
var url = tabs[0].url;
console.log(url);
});