Skip to content

Instantly share code, notes, and snippets.

View Zyzle's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿

Colin McCulloch Zyzle

🏴󠁧󠁢󠁳󠁣󠁴󠁿
View GitHub Profile
import { useCalendar } from '@h6s/calendar';
import { useMachine } from '@xstate/react';
import { Button as AriaButton } from 'ariakit/button';
import clsx from 'clsx';
import { isSunday, isSameDay, addMonths, isFuture, isPast, setDate } from 'date-fns';
import format from 'date-fns/format';
import isWithinInterval from 'date-fns/isWithinInterval';
import { FC, useCallback, useMemo } from 'react';
import Select from '@components/forms/components/Select';
@charpeni
charpeni / appveyor.yml
Created July 13, 2017 01:16
AppVeyor configuration for Angular CLI
image: Visual Studio 2017
environment:
nodejs_version: "6"
platform:
- x64
install:
- ps: Install-Product node $env:nodejs_version
@jcouyang
jcouyang / Stop_build_if_PR.sh
Last active June 15, 2020 02:03
make Bamboo support Github Pull Request with Status API
#!/bin/bash
if [[ -n ${bamboo_pull_num} ]]; then
echo 'stoping bamboo'
curl "http://${bamboo_BAMBOO_USER}:${bamboo_BAMBOO_password}@your.bamboo.domain/build/admin/stopPlan.action?${bamboo.planResultKey}-${bamboo.buildNumber}"
fi
@willurd
willurd / web-servers.md
Last active May 23, 2024 20:20
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@pcreux
pcreux / complete.sh
Created February 18, 2013 10:20
Github Commit Status API with Bamboo from Atlassian. Add those to your plan as Script.
# specs and cukes results are stored in JUnit format under test-reports
if (grep 'failures="[^0]"' test-reports/* || grep 'errors="[^0]"' test-reports/*); then
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
else
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Success!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
fi