Skip to content

Instantly share code, notes, and snippets.

View wojtek1150's full-sized avatar
🏕️

Wojciech wojtek1150

🏕️
View GitHub Profile
@Effect()
authenticateUser$ = this.actions$
.pipe(
ofType(authActions.AUTHENTICATE_USER),
switchMap(() => {
return this.angularFireAuth.authState.pipe(
map((identity: fromFirebase.User) => {
return identity
? new authActions.AuthenticateUserSuccess(ConvertingHelper.extractFirebaseUserInfo(identity))
: new authActions.AuthenticateUserFail('User Not logged In.');
@wojtek1150
wojtek1150 / bulk-delete-slack.js
Last active March 13, 2025 13:28
Delete all slack messages
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://app.slack.com/client/COMPANY_ID/CHANNEL_ID
// User id in on the browser URL.: https://app.slack.com/client/COMPANY_ID/CHANNEL_ID/user_profile/USER_ID
// Token can get from: https://api.slack.com/custom-integrations/legacy-tokens
// Pass it as a parameter: node ./bulk-delete-slack.js TOKEN CHANNEL_ID USER_ID DELAY
// Or use it without download the script: curl -Ls RAW_GIST_URL | node - TOKEN CHANNEL_ID
// GLOBALS #############################################################################################################
@wojtek1150
wojtek1150 / cut-off-npm-project-script.yml
Last active April 6, 2023 08:30
YML script for cut-off NPM based project to release branch
# YML script for cuffing of npm project to release branch
# There are 2 wersions, x.y.z-SNAPSHOT for development and x.y.z for releasing.
# Release branch will be created without snapshot postfix
before_script:
# fetch version to release from package.json snapshot version
- export RELEASE_VERSION=$(node -p "require('./package.json').version.replace('-SNAPSHOT','')")
# bump next version in pattern X.X+1.0 from RELEASE_VERSION
- export NEXT_VERSION=$(perl -pe 's/^(\d+)\.(\d+)\.(\d+)$/"$1.".($2+1).".0"/e' <<< $RELEASE_VERSION)
@wojtek1150
wojtek1150 / tag-npm-project-script.yml
Created April 6, 2023 08:30
YML script for create tag for NPM based project
# YML script for creating tag of npm project from release branch
# There are 2 wersions, x.y.z-SNAPSHOT for development and x.y.z for releasing.
# Tag will be created without snapshot postfix
before_script:
# fetch version to release from package.json snapshot version
- export RELEASE_VERSION=$(node -p "require('./package.json').version.replace('-SNAPSHOT','')")
# bump next patch version in pattern X.X.X+1 from RELEASE_VERSION
- export NEXT_PATCH_VERSION=$(perl -pe 's/^(\d+)\.(\d+)\.(\d+)$/"$1.$2.".($3+1)/e' <<< $RELEASE_VERSION)