Skip to content

Instantly share code, notes, and snippets.

View kostasx's full-sized avatar
💭
Uncaught ReferenceError

Kostas Minaidis kostasx

💭
Uncaught ReferenceError
View GitHub Profile
@kostasx
kostasx / gist:4511e2b57394f3cf2a404a7f4304e790
Last active December 13, 2023 11:51
Cohort0x02-13.12.2023
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-markdown>
<textarea data-template>
## Welcome!
@kostasx
kostasx / git_submodules.md
Created December 1, 2023 11:15 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@kostasx
kostasx / linux_bash.md
Created July 21, 2023 19:05 — forked from ldong/linux_bash.md
linux and bash notes I took on LFS101x from EDX LinuxFoundationX

Linux and Bash

Lets talk about Linux and Bash.

Notes

Notes were taken from edx.org of LFS101x Introduction to Linux.

Date: Sun Sep 28 00:30:48 EDT 2014

@kostasx
kostasx / remove-node-modules.md
Created June 19, 2023 14:41 — forked from lmcneel/remove-node-modules.md
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@kostasx
kostasx / slim-redux.js
Created May 5, 2023 09:30 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@kostasx
kostasx / redux-light-example.js
Created January 11, 2023 08:32 — forked from bloodyowl/redux-light-example.js
redux in 14 lines of code
const store = createStore((state = { counter: 0 }, action) => {
switch(action.type) {
case "INCREMENT":
return { counter: state.counter + 1 }
case "DECREMENT":
return { counter: state.counter - 1 }
default:
return state
}
})
@kostasx
kostasx / eu_members.json
Last active November 21, 2022 11:12 — forked from PoeHaH/gist:ab9d8ac1b4ddee168d4d96c71797df31
JSON representation of EU countries, 2 letter codes
[
{ "country": "Austria", "code": "AT" },
{ "country": "Belgium", "code": "BE" },
{ "country": "Bulgaria", "code": "BG" },
{ "country": "Croatia", "code": "HR" },
{ "country": "Cyprus", "code": "CY" },
{ "country": "Czech Republic", "code": "CZ" },
{ "country": "Denmark", "code": "DK" },
{ "country": "Estonia", "code": "EE" },
{ "country": "Finland", "code": "FI" },
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
@kostasx
kostasx / erc721-example.sol
Created November 23, 2021 21:39 — forked from aunyks/erc721-example.sol
My implementation of the ERC721 token standard. WARNING: THIS CODE IS FOR EDUCATIONAL PURPOSES. DO NOT DEPLOY TO THE NETWORK.
pragma solidity ^0.4.19;
contract ERC721 {
string constant private tokenName = "My ERC721 Token";
string constant private tokenSymbol = "MET";
uint256 constant private totalTokens = 1000000;
mapping(address => uint) private balances;
mapping(uint256 => address) private tokenOwners;
mapping(uint256 => bool) private tokenExists;
mapping(address => mapping (address => uint256)) private allowed;
mapping(address => mapping(uint256 => uint256)) private ownerTokens;