This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rebase --exec 'git commit --amend --no-edit -n -S' -i <previous-commit> | |
make a branch from your branch with unsigned commits (git checkout -b ...) | |
use git log --show-signature to see which are not signed | |
use the commit BEFORE the first one you want to fix in the above command (as <previous-commit>) | |
accept the generated file (don't change it) | |
save the file | |
use git log --show-signature to show the commits are now signed | |
push up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo service mongod stop | |
docker run -p 27017:27017 --name mongo -d mongo:3.6 | |
mongo | |
# n.b. you may get a warning that your shell and server versions differ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goto https://github.com/hmrc/app-config-production/blob/master/soft-drinks-industry-levy.yaml | |
Find the commented out (or in history) data-corrector-b64encoded | |
Paste value into REPL e.g. val bytesEncoded = '....' | |
val textDecoded = new String(java.util.Base64.getDecoder.decode(bytesEncoded)) | |
too see the entire content do println(textDecoded) | |
the decoded Json represents a list of returns that haven't been submitted - update the sdil-ref, period and data to match your usecase | |
re-encode... | |
val json = "...." | |
val bytesEncoded = java.util.Base64.getEncoder.encode(json.getBytes()) | |
add back into app-config-production and deploy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dave@dave-XPS-15-9550:~$ sm --stop DATASTREAM | |
killing service name: DATASTREAM | |
name: DATASTREAM ppid: 5191 pid: 7483 uptime: 01:20 | |
dave@dave-XPS-15-9550:~$ sm --start DATASTREAM --appendArgs '{"DATASTREAM":["-DeventEncrypter.enabled=false"]}' -fo | |
Starting 'DATASTREAM' from SNAPSHOT... | |
[u'./datastream/bin/datastream', u'-Dconfig.resource=application.conf', u'-J-Xmx256m', u'-J-Xms64m', u'-J-XX:MaxPermSize=128m', '-Dhttp.port=8100', '-Dservice.manager.serviceName=DATASTREAM', '-Dservice.manager.runFrom=SNAPSHOT', u'-DeventEncrypter.enabled=false'] | |
'DATASTREAM' version 'None' started with PID = 7859 | |
All services passed healthcheck | |
dave@dave-XPS-15-9550:~$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def varyReturn(sdilRef: String): Action[JsValue] = | |
Action.async(parse.json) { implicit request => | |
withJsonBody[ReturnVariationData] { data => | |
Logger.info("SDIL return variation sent to DMS queue") | |
val page = views.html.return_variation_pdf(data, sdilRef).toString | |
// TODO gist this.. | |
import sys.process._ | |
import java.io.PrintWriter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/bin | |
echo '#!/usr/bin/env bash | |
{ | |
sleep 1 | |
echo "use sdil-submissions" | |
echo "db.dropDatabase()" | |
} | mongo' > ~/bin/clearSdilDb.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert usb | |
boot machine hitting F12 | |
select boot from usb | |
if you get not enough space msg boot again with F12 and go down to BIOS | |
set secure boot enabled to false | |
set System Configuration -> SATA Operation to AHCI | |
reboot hitting F12 then boot from USB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Normally now use the build pipeline | |
DEV DEPLOY | |
1. Goto https://build.tax.service.gov.uk/ | |
2. Search for your service (top-right) | |
3. Find and check the automated build (build history, clicky build number, copy version number)(maybe build now) | |
4. # Goto https://ci-dev.tax.service.gov.uk | |
5. # Search for create-a-release-slug | |
6. # Build with parameters using service name and copied version number from 3 | |
7. Goto http://orchestrator.tools.development.tax.service.gov.uk/ |