This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { captureException, flush } from '@sentry/nextjs'; | |
| import NextErrorComponent from 'next/error'; | |
| import type { ErrorProps } from 'next/error'; | |
| import type { NextPage } from 'next'; | |
| interface AppErrorProps extends ErrorProps { | |
| err?: Error; | |
| hasGetInitialPropsRun?: boolean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| import sys | |
| import os | |
| import zipfile | |
| import tempfile | |
| from xml.etree import ElementTree | |
| from shutil import copyfile | |
| def stuffer(py_file, doc_file): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const SentryCli = require("@sentry/cli"); | |
| function truncateHash(hash) { | |
| return hash.trim().substring(0, 7) | |
| } | |
| function getShortHash() { | |
| const rev = fs.readFileSync(".git/HEAD").toString(); | |
| if (rev.indexOf(':') === -1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { | |
| createContext, | |
| useReducer, | |
| useEffect, | |
| useState, | |
| useContext, | |
| } from 'react'; | |
| import * as Oidc from 'oidc-client'; | |
| // Inspired by https://github.com/Swizec/useAuth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This builds off the excellent work of @lmarkus. | |
| The scripts below can be used in conjunction with the Neutral Face Emoji Tools Google Chrome extension to (bulk!) | |
| export emojis from one Slack team and import into another team: | |
| https://chrome.google.com/webstore/detail/neutral-face-emoji-tools/anchoacphlfbdomdlomnbbfhcmcdmjej | |
| Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621 | |
| Steps: | |
| 1) Run js in dev tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Enable inline editing: | |
| <li @Html.InlineEditingAttributes(Model.ProviderName, "Telerik.Sitefinity.News.Model.NewsItem", item.Id)> | |
| </li> | |
| //Enable editiong of a particular field: | |
| <a @Html.InlineEditingFieldAttributes("Title", "ShortText") href="β¦">@item.Title</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu/focal64" | |
| config.vm.network "private_network", ip: "192.168.33.10" | |
| config.vm.synced_folder "~/Documents/Sites", "/var/www/html", mount_options: ["dmode=777", "fmode=777"] | |
| config.vm.synced_folder "~/vagrant-localdev/db-details", "/var/www/db-details" | |
| config.vm.synced_folder "~/vagrant-localdev/configs", "/etc/apache2/sites-enabled" | |
| config.vm.synced_folder "~/vagrant-localdev/logs", "/var/www/logs" | |
| config.vm.synced_folder "~/vagrant-localdev/scripts", "/home/vagrant/scripts" | |
| config.vm.synced_folder "~/Documents/Transfer", "/home/vagrant/transfer" | |
| # Plenty of memory and CPU cores |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Postcode, Suburb, State, Lat, Lan | |
| 200, Australian National University, ACT, -35.280, 149.120 | |
| 221, Barton, ACT, -35.200, 149.100 | |
| 800, Darwin, NT, -12.800, 130.960 | |
| 801, Darwin, NT, -12.800, 130.960 | |
| 804, Parap, NT, -12.430, 130.840 | |
| 810, Alawa, NT, -12.380, 130.880 | |
| 810, Brinkin, NT, -12.380, 130.880 | |
| 810, Casuarina, NT, -12.380, 130.880 | |
| 810, Coconut Grove, NT, -12.380, 130.880 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Action, ActionCreator, Dispatch} from 'redux'; | |
| import {ThunkAction} from 'redux-thunk'; | |
| // Redux action | |
| const reduxAction: ActionCreator<Action> = (text: string) => { | |
| return { | |
| type: SET_TEXT, | |
| text | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Web.Mvc; | |
| using Telerik.Sitefinity.Mvc; | |
| namespace SitefinityWebApp.Mvc.Controllers | |
| { | |
| [ControllerToolboxItem(Name = "FileAsyncUploader", Title = "File Async Uploader", SectionName = "Custom MVC", CssClass = "sfMvcIcn")] | |
| public class FileAsyncUploaderController: Controller | |
| { | |
| [HttpGet] | |
| public ActionResult Index() |
NewerOlder