Skip to content

Instantly share code, notes, and snippets.

Avatar

John Cyrill Corsanes jcchikikomori

View GitHub Profile
@jcchikikomori
jcchikikomori / qs.js
Created May 19, 2021 — forked from cvan/qs.js
get query-string parameters (alternative to `URLSearchParams`)
View qs.js
var queryParams = window.location.search.substr(1).split('&').reduce(function (qs, query) {
var chunks = query.split('=');
var key = chunks[0];
var value = decodeURIComponent(chunks[1] || '');
var valueLower = value.trim().toLowerCase();
if (valueLower === 'true' || value === 'false') {
value = Boolean(value);
} else if (!isNaN(Number(value))) {
value = Number(value);
}
View iphone-x-all.scss
/**
* Targetting iPhone X Series of Smartphones
*
*/
$iphone-x-main-nav-height: 80px;
$iphone-x-main-nav-padding: calc(#{$iphone-x-main-nav-height} / 2);
$iphone-x-header-height: $header-height;
$iphone-x-height-offset: $iphone-x-main-nav-height + $iphone-x-header-height;
@jcchikikomori
jcchikikomori / shareit-blacklist.txt
Last active Mar 22, 2021
ShareIt App domain blacklist
View shareit-blacklist.txt
shareitgames.com
ushareit.com
*.shareit.com
*.wshareit.com
@jcchikikomori
jcchikikomori / ArchLinuxWSL2.md
Created Mar 13, 2021 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2
View ArchLinuxWSL2.md

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.

Installing Arch Linux

View android_instructions_28.md

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Here the SDK is under /usr/local/share/android-sdk because I may switch to a different Catalina user in the future, but it works fine under /Users/<your_user>/Library/Android/sdk as well.

Prerequisites:

See for brew, python3 and NodeJS on nvm see gist https://gist.github.com/agrcrobles/3d945b165871c355b6f169c317958e3e

Java 14

@jcchikikomori
jcchikikomori / nullaway-build.gradle
Created Aug 24, 2020 — forked from msridhar/nullaway-build.gradle
self-contained build.gradle for using NullAway on an Android app
View nullaway-build.gradle
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
// for android gradle plugin 3
google()
}
dependencies {
@jcchikikomori
jcchikikomori / UserAgentInterceptor.java
Created Jun 3, 2020 — forked from twaddington/UserAgentInterceptor.java
Injects a User-Agent header into outgoing OkHttp requests.
View UserAgentInterceptor.java
package com.enlighthq.mobile.http;
import android.os.Build;
import java.io.IOException;
import java.util.Locale;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
@jcchikikomori
jcchikikomori / jQuery resize listener
Created May 6, 2020 — forked from lstanard/jQuery resize listener
Resize listener to call functions based on window size
View jQuery resize listener
$(document).ready(function() {
var mobile,
w = $(window),
breakpoint = 640,
sw = document.documentElement.clientWidth,
sh = document.documentElement.clientHeight;
w.on('resize orientationchange', function() {
sw = document.documentElement.clientWidth;
View reset-and-typography.css
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,address,big,cite,code,del,em,img,ins,q,s,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,dialog,figure,footer,header,nav,section{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
html{height:100%;margin-bottom:1px;} /* always show scroll bar */
/* =GLOBAL ELEMENTS
--------------------------------------------------------------
Vertical Rhythm: 18px vertical grid
*/
body {
color:#222;
font-family:"Helvetica Neue",Helvetica,Arial,"Liberation Sans","FreeSans",sans-serif;
@jcchikikomori
jcchikikomori / 000_REQUIREMENTS.MD
Last active Apr 23, 2020
Download any web videos thru the knowledge of Web & Cloud development
View 000_REQUIREMENTS.MD