Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Acho Arnold AchoArnold

🏠
Working from home
Block or report user

Report or block AchoArnold

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AchoArnold
AchoArnold / docker.log
Created Jun 17, 2019
RDFUnit Docker Build Logs
View docker.log
Sending build context to Docker daemon 2.512MB
Step 1/6 : FROM openjdk:8-jdk-slim
---> 4de02be2e9ab
Step 2/6 : RUN apt-get update && apt-get upgrade -y && apt-get install maven -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Running in 45cf293d3581
Ign:1 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:2 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
@AchoArnold
AchoArnold / UnsetterHelper.php
Created Jun 7, 2019
Solution Unsetter Helper
View UnsetterHelper.php
<?php
/**
* Unsets properties on (nested) objects.
*
* This method works by first converting the object into an associative array.
* It then builds a new array by traversing over every element in the associative array and it excludes the array key
* representing the object's property which is to be unset.
* It then converts the new array into and object and it returns the object.
*
@AchoArnold
AchoArnold / UnsetterHelper.php
Created Jun 7, 2019
Create a function unsetter() which unsets properties on nested objects.
View UnsetterHelper.php
<?php
declare(strict_types=1);
namespace Tests\Unit;
use Tests\TestCase;
/*
* Unsets properties on (nested) objects.
View query.sql
#Query 1
$count = User::where('users.status', '=', 1)
->leftJoin('deposits', 'users.id', '=', 'deposits.user_id')
->select('users.*')
->groupBy('deposits.user_id')
->count();
# Count == 71
View api2.php
<?php
class ExternalAPI {
public static function getStats(){
$data = get_file_contents("http::jsonapi.com");
return $data
}
public static function getViews() {
View api.php
<?php
class ExternalAPI {
public static function getStats(){
$data = get_file_contents("http::jsonapi.com");
return $data
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am najela on github.
  • I am najela (https://keybase.io/najela) on keybase.
  • I have a public key whose fingerprint is 5E60 B217 83E8 9336 5E6D 8B1B 8095 BD4D 4901 DC67

To claim this, I am signing this object:

View gist:051399f9c85e333a73ff
npm http GET https://registry.npmjs.org/grunt-jquery-content/2.0.0
npm http 304 https://registry.npmjs.org/grunt-jquery-content/2.0.0
npm http GET https://registry.npmjs.org/grunt-wordpress/2.1.0
npm http GET https://registry.npmjs.org/he/0.5.0
npm http GET https://registry.npmjs.org/rimraf/2.2.8
npm http GET https://registry.npmjs.org/highlight.js/7.3.0
npm http GET https://registry.npmjs.org/async/0.9.0
npm http GET https://registry.npmjs.org/marked/0.3.2
npm http GET https://registry.npmjs.org/which/1.0.5
npm http GET https://registry.npmjs.org/cheerio/0.17.0
View ioslocaleidentifiers.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
View temp.js
$('#form1').submit(function() {
var valuesToSubmit = $(this).serialize();
$.ajax({
url: $(this).attr('action'), //sumbits it to the given url of the form
data: valuesToSubmit,
//type: 'POST',
dataType: "JSON", // you want a difference between normal and ajax-calls, and json is standard
success: function(data){
console.log(data)
}
You can’t perform that action at this time.