Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / gulp.js
Created August 10, 2016 21:00
Simple server using Gulp and Browser-sync...
var gulp = require('gulp');
var browserSync = require('browser-sync');
// Static server.
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: './'
}
});
@cicorias
cicorias / dumpenv.aspx
Created August 23, 2016 01:25
Dumps Env Variable for Asp.Net MySQL
<% @ Page Language="C#" %>
<%
Response.Write(System.Environment.GetEnvironmentVariable("MYSQLCONNSTR_localdb"));
%>
Published on Nov 6, 2015 https://www.youtube.com/watch?v=r5GnFru0zas
Guide to downgrade Windows 10 Enterprise to Professional:
1. Open regedit.exe and navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion
2. Change ProductName to Windows 10 Professional
3. Change EditionID to Professional
4. Navigate now to HKLM\Software\Wow6432Node\Microsoft\Wind­ows NT\CurrentVersion
5. Change ProductName to Windows 10 Professional
6. Change EditionID to Professional
@cicorias
cicorias / Example1.cs
Created August 29, 2016 01:49 — forked from davidfowl/Example1.cs
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
import Foundation
/**
*Defines a task which executed asynchronously in background thread.
*Every AsyncTask instance has 3 life cycle events:
* 1. beforeTask execution (Optional) - executed on UI Main thread
* 2. bagkroundTask execution - executed in background thread
* 3. afterTask execution (Optional) - executed on UI Main thread
*
*When caller instantiates AsyncTask he\she can decide what data type to pass in and out, using
* predefined generic types <BGParam,BGResult> where
@cicorias
cicorias / fixit.sh
Created September 24, 2016 17:44
Fixing some home brew crap
sudo chown $(whoami):admin /usr/local
#avoid the -R option unless you're sure - some apps break. man for example is manpages shit
@cicorias
cicorias / linking openssl on macOS
Created September 24, 2016 17:50
Notes on OpenSSL and macOS support or builds and linking
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
@cicorias
cicorias / isemtpy.js
Created October 4, 2016 01:23
an Is empty js test in TypeScript
export function isEmpty(obj: any): boolean {
if (obj === null
|| obj === undefined
|| (obj.length !== undefined && obj.length === 0)
|| Object.keys(obj).length === 0) {
return true;
}
return false;
}
@cicorias
cicorias / node-and-npm-in-30-seconds.sh
Created November 18, 2016 16:37 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh