Skip to content

Instantly share code, notes, and snippets.

View j3lte's full-sized avatar

Jelte Lagendijk j3lte

View GitHub Profile
@j3lte
j3lte / xml.json
Last active September 20, 2023 13:59
Mendix XML snippets
{
"MX Widget Property: attribute": {
"prefix": "propAttr",
"body": [
"<property key=\"$1\" type=\"attribute\" dataSource=\"$2\" required=\"${3|true,false|}\" onChange=\"$4\">",
" <caption>$5</caption>",
" <description>$6</description>",
" <attributeTypes>",
" <attributeType name=\"${7|AutoNumber,Binary,Boolean,DateTime,Decimal,Enum,HashString,Integer,Long,String|}\" />",
" </attributeTypes>",
@j3lte
j3lte / git.migrate
Created February 27, 2016 15:32 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@j3lte
j3lte / bongo.sh
Last active August 29, 2015 14:27 — forked from nhoening/bongo.sh
Allowing to pass a query for exporting specific data. Added a LIMIT option to limit the number of returned results. Added a debug switch to see errors.
#!/bin/bash
LOADING=false
DEBUG=/dev/null
usage()
{
cat << EOF
usage: $0 [options] <DBNAME>
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@j3lte
j3lte / popup-snippet.js
Last active April 20, 2018 02:21
Contentscript that can be injected by Google Chrome extension in order to check a variable on a page
var performTests = function (callback) {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
var thisTab = tabs[0];
chrome.tabs.executeScript(thisTab.id, {file: 'scripts/variable-checker.js'}, function(data) {
var response = data[0].response;
callback(response);
});
});
};
@j3lte
j3lte / gulpfile.js
Last active August 29, 2015 14:22 — forked from lmartins/gulpfile.js
// Include gulp
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
coffee = require('gulp-coffee'),
coffeelint = require('gulp-coffeelint'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
changed = require('gulp-changed'),
@j3lte
j3lte / gulpfile.js
Last active August 29, 2015 14:22 — forked from ktmud/gulpfile.js
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@j3lte
j3lte / index.html
Last active August 29, 2015 14:21
Test Page// source http://jsbin.com/tesita
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test Page</title>
<style>
body {
font-family: sans-serif;
}
.highlight {
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@j3lte
j3lte / README.md
Last active August 29, 2015 14:17 — forked from nikcub/README.md