Skip to content

Instantly share code, notes, and snippets.

View niikoo's full-sized avatar
🐌

Nikolai Ommundsen niikoo

🐌
View GitHub Profile
@niikoo
niikoo / print_ascii_art.js
Created October 31, 2017 09:55 — forked from aholmes/print_ascii_art.js
Prints ASCII art in your console.
var art=' :.+8.\n\
I=.$= O\n\
7O?7D?O~I$\n\
,+Z?+OI+:77\n\
~Z+?OO$OO7I\n\
.IOD?=$ZZO,\n\
OI~IZ+~8=,\n\
DDDDDDDDDDDDDDDDDDDD DDDD8 8DDDDDDDDDDDDDDDDDDDDD 7Z~+Z+$7D+?\n\
DDDDDDDDDDDDDDDDDDDD8 DDDD8 8DDDDDDDDDDDDDDDDDDDDD =$II$Z~IZ+\n\
DDDD8 DDDDD DDDD8 DDDDD ?$:==:~$O\n\
@niikoo
niikoo / ng-update-v6.js
Last active April 3, 2018 12:47 — forked from leo6104/ng-update-v6.js
Convert .angular-cli.json to angular.json (for Angular 6 Migration from Angular 2/4/5)
/**
* Created by leo6104 (github.com/leo6104)
* You can use this nodejs script on angular v5/v4/v2 project.
* 1. Place this gist file `ng-update-v6.js` to angular project's root path
* 2. use command `node ng-update-v6.js .angular-cli.json`
* 3. check angular.json file (created by ng-update-v6.js)
**/
const fs = require('fs');
const path = require('path');
@niikoo
niikoo / git-loglive
Created October 21, 2018 08:30 — forked from tlberglund/git-loglive
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
@niikoo
niikoo / Android - Enable ADB from recovery.md
Last active February 7, 2024 09:27 — forked from varhub/Android - Enable ADB from recovery.md
Android - Enable ADB from recovery

Android - Enable ADB from recovery

Credits to @TheOnlyAnil-@Firelord[^stackoverflow]

  • Requirements: a) stock recovery + rooted phone b) custom recovery

  • Files changed:

@niikoo
niikoo / set-profile.sh
Last active January 25, 2019 18:03
ViPER4Amdroid Bluetooth Profile Switcher
#!/system/bin/sh
if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters, should be 1 (Matching profile dir inside the Bluetooth V4A folder in the internal storage"
exit 1
fi
if [ "$(whoami)" -ne "root" ]
then
echo "Must be run with root privileges"
exit 1
namespace Extensions {
public static class GenericExtensions
{
/// <summary>
/// Check if class inherits a raw generic type, i.e. IEnumerable&lt;&gt;
/// </summary>
/// <param name="generic"></param>
/// <param name="toCheck"></param>
/// <returns></returns>
public static bool IsSubClassOfRawGeneric(this Type toCheck, Type generic, bool checkInterfaces = true)
@niikoo
niikoo / openpgp.txt
Created May 4, 2019 07:37
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:691efd302f82dc4639a13829d3765c50a817d48b]
@niikoo
niikoo / keybase.md
Last active May 12, 2019 20:18
keybase.md

Keybase proof

I hereby claim:

  • I am niikoo on github.
  • I am niikoo (https://keybase.io/niikoo) on keybase.
  • I have a public key ASDV9oK1XBM3PPXm9-yIsWw5FKaGrhh2gIEGCbbQyGYFlgo

To claim this, I am signing this object:

@niikoo
niikoo / regex.txt
Created June 20, 2019 14:05
Useful regular expressions
# FOR VSCode #
From multi-line package references, to single line:
<PackageReference Include="(.+?)">\n\s+?<Version>(.+?)</Version>\n\s+?</PackageReference>/<PackageReference Include="(.+?)">\n\s+?<Version>(.+?)</Version>\n\s+?</PackageReference>/
<PackageReference Include="$1" Version="$2" />