Skip to content

Instantly share code, notes, and snippets.

View verygreenboi's full-sized avatar
💻
Slamming keys!

Thompson Edolo verygreenboi

💻
Slamming keys!
View GitHub Profile
@verygreenboi
verygreenboi / isPalindrome.js
Created January 5, 2020 13:29 — forked from jherax/isPalindrome.js
Determines whether a string is a palindrome
/**
* Determines whether a text is a palindrome.
* Text is lowercased and non-alphabetic characters are removed.
*
* @param {string} text - the words to check
* @return {boolean}
*/
function isPalindrome(text) {
if (!text || text.length < 2) return false;
text = text.replace(/[\s\W]/g, '');
@verygreenboi
verygreenboi / README.md
Created January 5, 2020 13:27 — forked from jherax/README.md
Git Alias and Rebase

Git Alias and Git Rebase

WHEN TO DO REBASE

After each commit in our branch, in order to be up-to-date with the integration branch.

@verygreenboi
verygreenboi / filterArray.js
Created January 5, 2020 13:24 — forked from jherax/filterArray.js
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects by custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
HeadlessChrome 79.0.3945 (Mac OS X 10.15.0) XXXComponent should call callback on clear FAILED
Uncaught Error: Uncaught (in promise): GeolocationPositionError: {} thrown
{
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
apiVersion: v1
kind: Namespace
metadata:
name: mongo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongo
namespace: mongo
@verygreenboi
verygreenboi / ci_pipeline_travis_example.yml
Created December 14, 2018 02:07 — forked from JacopoDaeli/ci_pipeline_travis_example.yml
TravisCI setup example for CI pipeline
# Use Dockerized infrastructure
sudo: false
# Use node_js environnement
language: node_js
node_js:
- "6"
# Cache Gcloud SDK between commands
cache:
import Foundation
import UIKit
// Usage Examples
let system12 = Font(.system, size: .standard(.h5)).instance
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance
struct Font {
public static boolean isNetworkAvailable (Context context) {
if (connectedToTheNetwork(context)) {
try {
HttpURLConnection urlc = (HttpURLConnection)
(new URL("http://clients3.google.com/generate_204")
.openConnection());
urlc.setRequestProperty("User-Agent", "Android");
urlc.setRequestProperty("Connection", "close");
urlc.setConnectTimeout(1500);
urlc.connect();
@verygreenboi
verygreenboi / android_color_transparency.txt
Created June 6, 2018 13:23 — forked from cesarferreira/android_color_transparency.txt
android color transparency cheat sheet
<color name="black">#**000000</color>
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3