Skip to content

Instantly share code, notes, and snippets.

View kellyselden's full-sized avatar

Kelly Selden kellyselden

View GitHub Profile
@kellyselden
kellyselden / delete-remote-tags-missing-from-local.js
Created March 9, 2021 10:42
node delete-remote-tags-missing-from-local origin
'use strict';
const fs = require('fs').promises;
const { spawn } = require('child_process');
async function waitForEnd(process) {
let stderr = '';
process.stderr.on('data', data => {
stderr += data.toString();
import Ember from 'ember';
function func1() {
alert('func1');
}
function func2() {
alert('func2');
}
export default Ember.Controller.extend({
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@kellyselden
kellyselden / components.my-component.js
Last active December 4, 2016 22:25
ember 2.10 + jquery 3: fail
import Ember from 'ember';
export default Ember.Component.extend({
isPlainObject: Ember.computed('options', function() {
let options = this.get('options');
return Ember.$.isPlainObject(options);
}),
jqueryVersion: Ember.$.fn.jquery
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@kellyselden
kellyselden / controllers.application.js
Last active September 11, 2016 01:45
prototype extension bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
count: 4,
rawCount: 4,
actions: {
update(value) {
if (value > 999) {
this.set('count', 999);
@kellyselden
kellyselden / BigUInt.cs
Created November 8, 2015 16:04
BigUInt
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
public class BigUInt
{
string number;
@kellyselden
kellyselden / IAM
Last active November 29, 2017 11:41
Only run EC2 instances during work hours
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt123456789",
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:DescribeInstances"
@kellyselden
kellyselden / ember-cli-regenerate-files.bat
Last active October 17, 2015 19:49
reruns all the generators for your project, overwriting everything
if "%1"=="" goto :eof
setlocal enabledelayedexpansion
pushd %1\app
echo Set WshShell = Wscript.CreateObject("Wscript.Shell")>commands.vbs
echo WshShell.SendKeys "pushd %1{ENTER}">>commands.vbs
for /d %%d in (*) do (
if not "%%d"=="instance-initializers" if not %%d==locales if not %%d==styles if not %%d==templates if not "%%d"=="torii-adapters" (
pushd %%d
set folderName=%%d
set generator=!folderName:~0,-1!