Skip to content

Instantly share code, notes, and snippets.

View gvorster's full-sized avatar

August Vorsterman van Oijen gvorster

View GitHub Profile
@gvorster
gvorster / gist:440b42e6365541621db406bf3f9d6fa8
Created February 4, 2024 15:13
Add files in current folder to remote github repo
git init
git add .
git commit -m "init"
git remote add origin REPO_URL
git push -u origin main
@gvorster
gvorster / vue
Created May 28, 2023 07:29
Tailwind - center logo
<div class="logo grid grid-cols-1 gap-0 place-items-center">
<div>
<Link :href="route('home')" replace>
<v-img src="/images/logo.png"/></Link>
</div>
</div>
@gvorster
gvorster / vue
Created May 28, 2023 06:31
vuetify v-list group example
<v-list-group value="GROUP_ID">
<template v-slot:activator="{ props }">
<v-list-item v-bind="props" prepend-icon="mdi-home" title="Menu title"></v-list-item>
</template>
<Link :href="route('bestellijst.index')">
<v-list-item v-bind="props" prepend-icon="mdi-home" title="Sub item 1"></v-list-item>
</Link>
<Link :href="route('home')">
@gvorster
gvorster / new_gist_file.html
Created June 24, 2015 08:36
Slide menu panel in header
// create panel in header
// set href to id of panel
<div data-role="header">
<a href="#menuPanel" class="ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all">No text</a>
<h1><g:message code="applicationTitle"/></h1>
<div data-role="panel" id="menuPanel" data-display="overlay" data-position="left">
panel content
</div>
@gvorster
gvorster / index.html
Last active August 29, 2015 14:23
JQuery Mobile template
<!doctype html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
@gvorster
gvorster / new_gist_file.groovy
Created June 24, 2015 07:58
Set default home page
class UrlMappings {
static mappings = {
// ...
"/"(controller:"mycontroller", action:"myindex") // <-----------
// ...
}
}
# run with different port
grails run-app -Dgrails.server.port.http=9090
@gvorster
gvorster / new_gist_file.sh
Created June 19, 2015 07:20
Find files examples
# find recursive files and searches on multiple patterns
find . -iname "key1" -o -iname "key2"
# exclude dist folder and search for multiple patterns
find . -path ./dist -prune -o -type f \( -iname "*key1*" -or -iname "*key2*" \)
@gvorster
gvorster / new_gist_file.mysql
Created June 19, 2015 07:19
Create and restore dump file
# backup
mysqldump -u myname -pmypassword mydatabase > mydumpfile
# restore
mysql -u mysql -pmypassword mydatabase < mydumpfile
@gvorster
gvorster / new_gist_file.sh
Created June 19, 2015 07:09
Copy folder recursively
# copies source folder to target folder recursively
cp -r /from/path /to/path