Helpers and examples for unit testing on Angular applications and libraries.
import datetime | |
import time | |
import requests | |
import playsound #You might need to install pygobject if you get an error about missing "gi" module for this. | |
playsound.playsound("ding.mp3") #You'll need a file here that is noisy | |
while True: | |
try: | |
r = requests.post( | |
"https://ads-prd-gov-1-sp.test-for-coronavirus.service.gov.uk/testcentres/availabilityquery", |
-------------------------------------------------------------------- | |
-- Queries related to distribution of metadata. | |
-- Find the number of users per profile. | |
SELECT count(id), Profile.name | |
FROM User | |
WHERE User.IsActive = true | |
GROUP BY Profile.name | |
-- Find the distribution of Apex classes per namespace. | |
select count(id), NameSpacePrefix |
If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.
To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.
-
Clone some repo (you've probably already done this step).
git clone git@github...some-repo.git
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
S3BUCKETNAME="$1" | |
else | |
echo ERROR: Failed to supply S3 bucket name | |
exit 1 | |
fi | |
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public |
#!/bin/bash | |
APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens" | |
SONG=$(osascript -e 'tell application "Spotify" to name of current track as string') | |
URLSONG=$(echo "$SONG" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"') | |
while true | |
do | |
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null | |
sleep 60 | |
done |
If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.
To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.
-
Clone some repo (you've probably already done this step)
git clone git@github...some-repo.git
import { Platform } from 'ionic-angular'; | |
import { Keyboard } from 'ionic-native'; | |
import { Subscription } from 'Rxjs/rx'; | |
@Component({ | |
selector: 'page-conversation', | |
templateUrl: 'conversation.html' | |
}) | |
export class ConversationPage { | |
@ViewChild(Content) content: Content; |
/** | |
* For some reason I'm always forgetting this. | |
* Probably because I'm not a mathematician. | |
*/ | |
let counter = 0 | |
const prev () => { | |
counter -= 1 | |
} |