Skip to content

Instantly share code, notes, and snippets.

View sirdoro1's full-sized avatar
👻
Ghosting

Oghenedoro David Agbroko sirdoro1

👻
Ghosting
View GitHub Profile
@sirdoro1
sirdoro1 / google_translate.html
Created June 8, 2025 21:37 — forked from carolineschnapp/google_translate.html
Google Translate Embed Code
<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
@sirdoro1
sirdoro1 / .deps...remix-tests...remix_accounts.sol
Created December 29, 2021 00:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
@sirdoro1
sirdoro1 / vue.md
Created April 12, 2021 14:18 — forked from DawidMyslak/vue.md
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modyfing state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@sirdoro1
sirdoro1 / RouteDirectives.php
Created January 4, 2020 23:04 — forked from calebporzio/RouteDirectives.php
Blade Route Directives
<?php
// Register these inside a service provider:
Blade::directive('route', function ($expression) {
return "<?php echo route({$expression}) ?>";
});
Blade::directive('routeIs', function ($expression) {
return "<?php if (request()->routeIs({$expression})) : ?>";
@sirdoro1
sirdoro1 / curl.md
Created December 27, 2019 14:26 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@sirdoro1
sirdoro1 / isPalindrome.php
Created June 8, 2019 15:41 — forked from kenjipm/isPalindrome.php
A palindrome is a word that reads the same backward or forward.
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$word = strtolower($word);
$length = strlen($word);
for($i = 0; $i < $length; $i++)
{
@sirdoro1
sirdoro1 / how_to.md
Created May 18, 2019 12:02 — forked from oanhnn/how_to.md
How to fix composer error "Content-Length Mismatch"

First, run:

$ composer config --list --global        //this will get the composer home path.
[home] /root/.composer                   //it's my composer home path.

And then, edit the config.json in [home] directory, make it like this:

{
  "config": {
 "github-protocols": [