Skip to content

Instantly share code, notes, and snippets.

View periface's full-sized avatar

Alan Torres periface

View GitHub Profile
@samuelyee
samuelyee / Ionic Android Development on WSL2.md
Last active August 19, 2025 18:05 — forked from fedme/Ionic Android Development on WSL.md
Ionic Android Development on WSL2 (Windows Subsystem for Linux)

Ionic Android Development on WSL2

This setup is assuming that GUI Linux apps can run in your WSL2.

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic CLI:

cd ~
sudo apt update
sudo apt upgrade
@sheerlox
sheerlox / index.js
Created May 16, 2017 16:48
Get current streak for Github contributions
const DOMParser = require('dom-parser')
const parser = new DOMParser();
const fs = require('fs')
// Instead of getting this from file, use "https://github.com/users/{username}/contributions"
fs.readFile(__dirname + '/response.xml', function (err, data) {
if (err) {
throw err;
}
@hikalkan
hikalkan / AccountController.cs
Created January 13, 2016 16:25
Adding a new property to session
//Add new property to claims on login
private async Task SignInAsync(User user, ClaimsIdentity identity = null, bool rememberMe = false)
{
if (identity == null)
{
identity = await _userManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
}
identity.AddClaim(new Claim("Application_UserEmail", user.EmailAddress)); //SETTING NEW PROPERTY
@umidjons
umidjons / index.html
Last active January 6, 2024 18:46
Upload File using jQuery.ajax() with progress support
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload File using jQuery.ajax() with progress support</title>
</head>
<body>
<input type="file" name="file" id="sel-file"/>
@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache