Skip to content

Instantly share code, notes, and snippets.

View tyte's full-sized avatar
🐿️

Ieva Sargautyte tyte

🐿️
View GitHub Profile
@tyte
tyte / how-to-git-patch-diff.md
Created October 26, 2022 14:59 — forked from nepsilon/how-to-git-patch-diff.md
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch
@tyte
tyte / js-monsters-minesweeper.html
Last active May 5, 2022 07:14
JS monsters minesweeper
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Monsters!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-shuffle-and-display-images.html
Created May 4, 2022 15:39
JS shuffle and display images from an array
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Monsters!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-encode-third-party-code.html
Created April 30, 2022 14:28
JS encode third party code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dragon Trainer Monthly - Author Data</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dragon Trainer Monthly - Author Data</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-inject-content-from-api.html
Last active April 26, 2022 17:50
JS inject content from API
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dragon Trainer Monthly</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-fetch-api-unique-quotes-with-async.html
Created April 25, 2022 06:42
JS fetch api data with async await
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Random Ron</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-fetch-api-unique-quotes.html
Last active April 20, 2022 18:29
JS fetch unique quotes from api
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Random Ron</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-fetch-api.html
Last active April 19, 2022 13:56
JS fetch api example with random quotes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Random Ron</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;
@tyte
tyte / js-character-and-words-count-aria.html
Last active April 15, 2022 10:57
JS ARIA character and words count
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Character & Word Count</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
margin: 0 auto;