Skip to content

Instantly share code, notes, and snippets.

View kinsleykajiva's full-sized avatar
🏠
Working from home

Kinsley Kajiva kinsleykajiva

🏠
Working from home
  • Africa
  • 00:24 (UTC +02:00)
View GitHub Profile
@codinginflow
codinginflow / AddNoteActivity.java
Created July 28, 2021 20:41
Architecture Components Beginner Tutorial Part 8
package com.codinginflow.architectureexample;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.NumberPicker;
@Dcosta2205
Dcosta2205 / HeadsUpNotificationActionReceiver.java
Last active September 8, 2021 07:31
Broadcast receiver to handle headup notification button clicks
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
public class HeadsUpNotificationActionReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
@damianmcdonald
damianmcdonald / README.md
Last active November 23, 2022 10:45
Node.js application which creates an S3 bucket and uploads a file with permissions and metadata

Overview

A Node.js application which creates an S3 bucket and uploads a file with permissions and metadata.

This example uses the createBucket and upload methods of the AWS SDK for JavaScript.

See API doocumentation for detailed information; https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

To see the available parameters for the s3 upload method, see the paramObjects.js file.

const Eureka = require('eureka-js-client').Eureka;
const eurekaHost = (process.env.EUREKA_CLIENT_SERVICEURL_DEFAULTZONE || '127.0.0.1');
const eurekaPort = 8761;
const hostName = (process.env.HOSTNAME || 'localhost')
const ipAddr = '172.0.0.1';
exports.registerWithEureka = function(appName, PORT) {
const client = new Eureka({
instance: {
@kinsleykajiva
kinsleykajiva / bitbucket-pipelines.yml
Created October 7, 2019 08:05
This is a pipeline that worked for me on bitbucket.For ftp i didnt add public folder to the host name it just worked still
image: vesica/php73
pipelines:
default:
- step:
deployment: production
caches:
- composer
script:
- apt-get update
@kinsleykajiva
kinsleykajiva / Default (Windows).sublime-keymap
Created March 27, 2019 17:09
Kinsley Kajiva Sublime Text 3 keyboard short cuts
[
{"keys" : ["ctrl+k"], "command" : "toggle_side_bar" } ,
{"keys" : ["alt+d"], "command" : "toggle_side_bar" } ,
{ "keys" : ["alt+c"], "command" : "power_cursor_add" },
{ "keys": ["alt+q"], "command": "close" },
{ "keys" : ["ctrl+w"], "command" : "expand_selection", "args" : {"to" : "word"} },
{ "keys" : ["ctrl+alt+u"], "command" : "upper_case" },
{ "keys" : ["ctrl+alt+l"], "command" : "lower_case" },
{ "keys" : ["ctrl+alt+j"], "command" : "reindent" } ,
{ "keys" : ["ctrl+shift+a"], "command" : "align_tab","args" : {"live_preview" : true}} ,
@kinsleykajiva
kinsleykajiva / Preferences.sublime-settings
Created March 27, 2019 17:07
Kinsley Kajiva Sublime Text 3 Settings Template File
{
"auto_complete": true,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Answer for http://stackoverflow.com/questions/31681732/lodash-get-duplicate-values-from-an-array">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@JamieMason
JamieMason / group-objects-by-property.md
Created September 14, 2018 07:38
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;