Skip to content

Instantly share code, notes, and snippets.

View luceos's full-sized avatar
👨‍🎨
Painting web

Daniël Klabbers luceos

👨‍🎨
Painting web
View GitHub Profile
@gudbergur
gudbergur / README.markdown
Created February 19, 2012 23:49
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@luceos
luceos / svn-commands
Created March 14, 2012 15:29
Most used svn commands
# zie alle openstaande beschikbare commits
svnmerge.py avail -l
# commit een bepaalde revisie
svnmerge.py merge -r .xxx
# commit deze revisie direct terug naar de huidige branche
svn commit -F svn<tab> (commit message)
# ignore files from svn
svn propset svn:ignore <file> .
@carlcrott
carlcrott / gist:2218175
Created March 27, 2012 17:24
JSON validation method
class String
def valid_json?
begin
JSON.parse(self)
return true
rescue Exception => e
return false
end
end
end
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active June 8, 2024 10:07
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 23, 2024 12:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2"
@mpociot
mpociot / README.md
Last active March 25, 2021 18:48
Discord + BotMan example

BotMan - Discord example chatbot

Once you set up your discord bot, you need to add it to your server:

Look up your chatbot's client ID and visit this URL:

https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot&permissions=0

Run the discord.php file through CLI:

@foklepoint
foklepoint / .gitlab-ci.yml
Created July 8, 2017 20:25
Build and Push images to GCP Container Registry with Gitlab CI
image: docker:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID
IMAGE_NAME: image_id
services:
@sebastiaanluca
sebastiaanluca / after_activate_new_release.sh
Created June 1, 2018 11:50
Example of how to gracefully deploy a new release when using Envoyer. Optionally, you could just stop/resume only the Horizon daemons, but since we only have one Supervisor daemon, this works fine.
# After *Activate New Release*
cd {{ release }}
php artisan cache:clear
php artisan view:clear
php artisan purifier:clear
php artisan config:cache
php artisan route:cache