Skip to content

Instantly share code, notes, and snippets.

View darjanin's full-sized avatar

Milan Darjanin darjanin

  • Vacuumlabs
  • Bratislava
View GitHub Profile
@darjanin
darjanin / git-alias
Created June 22, 2021 08:15
Alias for git
alias ga='git add'
alias gb='git branch'
alias gc='git commit -v'
alias gcb='git checkout -b'
alias gco='git checkout'
alias gcm='git checkout master'
alias gd='git diff'
alias gl='git pull'
alias gm='git merge'
alias glg='git log --all --graph --pretty=format:"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit --date=relative'
@darjanin
darjanin / index.html
Last active December 5, 2020 14:30
Playground Test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<!-- <link rel="stylesheet" href="style.css"> -->
</head>
<body>
<h1>Hello world</h1>
@darjanin
darjanin / mac-setup.md
Last active May 19, 2020 10:25
Mac setup

New Mac Setup

Useful shortcuts

Shortcut Description
⌘⇧. Toggle hidden files

Preferences

// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: teal; icon-glyph: utensils;
const click = "http://m.clickfood.sk/sk/menu/";
async function getMenu(link, parseMenu) {
try {
if (link.endsWith("date=")) {
const date = getMomentForMenu().format("DD.MM.YYYY");
Feki APP [11:35]
Prišiel ti obed veg4p z Veglife :slightly_smiling_face:
Feki APP [12:15]
Prišiel ti obed presto1p2 z Pizza Presto :slightly_smiling_face:
Feki APP [12:10]
Prišiel ti obed pizza24v33 z Pizza Presto :slightly_smiling_face:
Prišiel ti obed pizza24v33 z Pizza Presto :slightly_smiling_face:
zemiak = [
('Tesco', 20, 7.99),
('Lidl', 10, 9.5),
('Kaufland', 20, 6.99),
('GVP', 5, 2.3)
]
def cena_za_kilogram(balenie):
return balenie[2] / balenie[1]
showUser(userId){
if (this.state.loggedIn) {
this.setState({
userToShow: userId || databaseUtils.getUserInfo().uid
})
this.changePage('user')
}
}
@darjanin
darjanin / learning.md
Last active February 5, 2016 13:42
Learning resources
#!/usr/bin/env ruby
require 'Matrix'
class B
attr_accessor :points
attr_reader :average
def initialize
@points = []
@average = [0, 0, 0]

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).