Skip to content

Instantly share code, notes, and snippets.

View Drumstix42's full-sized avatar
🍕

Drumstix42 Drumstix42

🍕
View GitHub Profile
\documentclass[11pt, oneside]{article}
\usepackage[margin=0.5in]{geometry}
\geometry{letterpaper}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{xcolor}
\pagecolor{white}
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue]{hyperref}
\pagestyle{empty}
@BabOuDev
BabOuDev / vueWrapper.js
Created September 13, 2019 15:42
AngularJS directive wrapper for VueJS components
import Vue from 'vue'
// the list of vue components to install
import components from './vueComponents'
class SlVueWrapper {
constructor($timeout) {
this.name = 'vue';
this.restrict = 'A';
this.terminal = true;
@apal21
apal21 / ES5 class.js
Last active March 7, 2023 08:06
Example for blog to show the difference between ES5 and ES6 javascript classes using inheritance and prototypes use cases.
'use strict';
/**
* Person class.
*
* @constructor
* @param {String} name - name of a person.
* @param {Number} age - age of a person.
* @param {String} gender - gender of a person.
*/
@douglascayers
douglascayers / github-export-labels.js
Last active September 14, 2023 15:30
Export and import GitHub labels between projects by running JavaScript in the browser console to automate clicks.
/**
* Inspired by @MoOx original script: https://gist.github.com/MoOx/93c2853fee760f42d97f
* Adds file download per @micalevisk https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-2660220
*
* Changes include:
* - Get the description from the `title` attribute instead of `aria-label` (doesn't exist anymore)
* - Use style.backgroundColor and parse the rgb(...) to hex (rather than regex parsing of 'style' string)
* - Downloads labels to a JSON file named after the webpage to know which GitHub repo they came from.
*
* Last tested 2019-July-27:
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active March 14, 2026 19:15
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@DannyFeliz
DannyFeliz / webpack.config.js
Created September 13, 2016 08:00
Add timestamp to webpack
/**
* Get current time
* @example 10:34:12 am
* @param {Date} date
* @returns {string}
*/
function getTime(date) {
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 15, 2026 11:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@michaelgmcd
michaelgmcd / gulpfile-complete.js
Last active June 14, 2018 19:10
Complete gulpfile used for AngularJS, SASS, Browser-Sync, Bower, Karma, and Image minification
/*
* Gulpfile
* @author Michael McDermott
* Created on 5/12/15.
*/
'use strict';
var gulp = require('gulp');
var path = require('path');
@RadoMark
RadoMark / usage.html
Last active December 26, 2019 19:14
Watchers toggler directive
<div ng-app>
<div ng-controller="TestCtrl">
<ul ng-repeat="elements in array" watchers-toggler="toggler()">
<li ng-repeat="element in elements">{{element}}</li>
</ul>
</div>
</div>
@kirschbaum
kirschbaum / app.js
Last active December 4, 2020 16:18 — forked from victorb/app.js
var myApp = angular.module('myApp', []);
myApp.directive('googleplace', function() {
return {
require: 'ngModel',
scope: {
ngModel: '=',
details: '=?'
},
link: function(scope, element, attrs, model) {