Skip to content

Instantly share code, notes, and snippets.

View vogelbeere's full-sized avatar

Yvonne Aburrow vogelbeere

  • Cambridge, Ontario, Canada
View GitHub Profile
@vogelbeere
vogelbeere / README.md
Last active March 2, 2022 19:21
A bookmarklet for replacing biologically essentialist language with inclusive language

🏳️‍⚧️ 🏳️‍🌈 Inclusive Lens 🔎

What is it?

A bookmarklet for replacing biologically essentialist language with inclusive language.

How to install

  1. Create a new bookmark on your browser's bookmarks bar.
  2. Right-click on it and select Edit.
@vogelbeere
vogelbeere / login.js
Created April 13, 2018 14:05
Authenticate with Moodle from a mobile app using jQuery
My mobile app needs to log in to Moodle to get Json data from a webservice and display it using Angular.
In order to do that, I need to pass in a username and password and get a Moodle webservice token back, so my app doesn't need to log in again (at least until the token expires).
@vogelbeere
vogelbeere / index.html
Created April 13, 2018 13:59
Getting multiple Angular modals to work with http response data
<!--Step 1. Put the required script tags in your HTML-->
<script src="scripts/angular.min.js"></script>
<script src="scripts/ui-bootstrap.js"></script>
<script src="scripts/ui-bootstrap-tpls.min.js"></script>
<!--angular.min.js is the main Angular library; ui-bootstrap.js is the Angular UI bootstrap library; ui-bootstrap-tpls.min.js is the Angular templating script to make the modal template display properly.-->
<!--Step 2. Put the modal template in your HTML, inside your ng-app div-->
@vogelbeere
vogelbeere / index.html
Last active April 13, 2018 14:03
Getting Angular to work with a Moodle webservice
<!--Step 4. create ng-app instance in html (in index.html of your mobile app)-->
<body>
<div class="overlay">&nbsp;</div>
<div data-role="page" id="welcome-page">
<div data-role="header" class="header">
<h1 id="app-title">
App title
</h1>
</div>
@vogelbeere
vogelbeere / items.js
Created April 13, 2018 13:32
Angular: Submit a post request from a modal and refresh the main page
var myApp = angular.module('myApp', ['ui.bootstrap']);
/* main controller - items */
myApp.controller('itemsCtrl', function ($scope, $rootScope, $http, $uibModal) {
//wrap $http.get request in a function
$scope.loadMyData = function () {
url = '<your_server>';
$http.get(url).then(function (response) {
$scope.items = response.data;