Skip to content

Instantly share code, notes, and snippets.

View kieran23101's full-sized avatar
๐Ÿ‘‹
Focusing

Kieran Corkin kieran23101

๐Ÿ‘‹
Focusing
View GitHub Profile
@kieran23101
kieran23101 / Triangles.scss
Last active December 1, 2017 15:51
Mixin for CSS triangles
@mixin arrow($size, $color, $distanceFromLeft, $position, $InsideOrOut) {
&:after {
content: "";
width: 0px;
height: 0px;
border-left: $size solid transparent;
border-right: $size solid transparent;
@if $position == top and $InsideOrOut == inside {
@kieran23101
kieran23101 / Gradient.css
Created November 16, 2017 16:58
Text with a gradient color
.gradient {
background-image: -webkit-gradient(linear,0% 0%,25% 100%,from(#ff2c2c),to(#7a5e91));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@kieran23101
kieran23101 / Example.ascx.resx
Created November 29, 2017 10:32
Adding HTML into a .resx file
&lt;br /&gt; = <br />
<!-- Example of one inside a file -->
<data name="YourName.Text">
<value>If you are booking on behalf of someone else please include their name in the message box below. &lt;br /&gt; Name</value>
</data>
@kieran23101
kieran23101 / app.scss
Created December 6, 2017 10:07
Changing Bootstrap 4 Navbar toggler colour
.custom-toggler .navbar-toggler-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
}
// May need to change the border color too.
// E.G
.navbar-toggler {
border-color: #fff !important;
}
@kieran23101
kieran23101 / facebook-warning.js
Created January 25, 2018 09:43
Example of how facebook have their warning in their console
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
const warningDescCSS = 'font-size: 18px;';
console.log('%cStop!', warningTitleCSS);
console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Facebook feature or \"hack\" someone's account, it is a scam and will give them access to your Facebook account.", warningDescCSS);
console.log('%cSee https://www.facebook.com/selfxss for more information.', warningDescCSS);
@kieran23101
kieran23101 / snippets.json
Created February 7, 2018 16:17
Visual Studio SCSS Bootstrap 4 Snippets
"Small Device Only": {
"prefix": "sm",
"body": [
"@include media-breakpoint-only(sm) {",
"\t$1",
"}"
]
},
"Medium Device Only": {
"prefix": "md",
@kieran23101
kieran23101 / Add Open in VS Code to context menu.reg
Created April 3, 2018 09:58
Adds a "Open in VS Code button when right clicked into a folder
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Open in VS Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@kieran23101
kieran23101 / stopwatch.js
Created April 30, 2018 11:32
A javascript object to make a stopwatch, edit stopwatch.js for output
/*
////////////////////////////////////////////////
EXAMPLE USAGE
//////////////////////////////////////////////
var timer = document.getElementById('timer');
var toggleBtn = document.getElementById('toggle');
var resetBtn = document.getElementById('reset');
var watch = new Stopwatch(timer);
@kieran23101
kieran23101 / ListEditMode.cs
Last active April 12, 2021 14:15
Add accordion in edit mode for list of items
@if (DotNetNuke.Common.Globals.IsEditMode())
{
<div id="[email protected]">
<div class="card">
<div class="card-header" id="[email protected]" >
<h5 class="mb-0">
<a class="btn btn-primary text-white" data-toggle="collapse" data-target="#[email protected]" aria-expanded="true" aria-controls="[email protected]">Show Admin Section</a>
</h5>
</div>
<div id="[email protected]" class="collapse" aria-labelledby="[email protected]" data-parent="#[email protected]">
@kieran23101
kieran23101 / Change pane names of modules.sql
Last active September 6, 2018 10:57
This will search through all modules and move all the modules in one pane to the other useful for when a pane name is changed on a large website (USE FOR DNN) Tested on DNN 7
SELECT PaneName FROM dbo.TabModules
UPDATE dbo.TabModules
SET PaneName = 'NewPaneName'
WHERE PaneName = 'OldPaneName'
-- Update Using Module Title
SELECT PaneName FROM dbo.TabModules
UPDATE dbo.TabModules
SET PaneName = 'New pane name'
WHERE 'Module Title' = 'Your Title'