$ git remote set-url origin <remote_repo>
$ git checkout -- .
$ git reset --hard
<!-- 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: |
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.
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 |
# 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 |
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)); |
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
// 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 }, |
Please petition Github to support HTTPS on github pages: https://github.com/contact
Here's what I wrote:
Obviously, a lot of people want HTTPS for github pages:
Until recently, that would be difficult to implement but, as it turns out, the implementation is pretty much complete:
chrome.tabs.query({'active': true, 'lastFocusedWindow': true, 'currentWindow': true}, function (tabs) { | |
var url = tabs[0].url; | |
console.log(url); | |
}); |