Servers - census
| id | name |
|---|---|
| 1 | Connery |
| 10 | Miller |
| 13 | Cobalt |
| 17 | Emerald |
| 25 | Briggs |
| #!/bin/sh | |
| LOGFILE=/tmp/bluehost_backup.log | |
| EXPECTED_ARGUMENTS=3 | |
| exec 6>&1 # Link file descriptor #6 with the standard output | |
| exec > $LOGFILE # stdout sent to $LOGFILE | |
| #Check script arguments | |
| if [ $# -ne $EXPECTED_ARGUMENTS ] | |
| then | |
| echo "No arguments supplied." |
| jQuery.fn.getPath = function () { | |
| if (this.length != 1) throw 'Requires one element.'; | |
| var path, node = this; | |
| while (node.length) { | |
| var realNode = node[0], name = realNode.localName; | |
| if (!name) break; | |
| name = name.toLowerCase(); | |
| var parent = node.parent(); |
| id | name |
|---|---|
| 1 | Connery |
| 10 | Miller |
| 13 | Cobalt |
| 17 | Emerald |
| 25 | Briggs |
| #!/bin/sh | |
| #check if i3lock is already running | |
| pgrep i3lock > /dev/null && exit 1 | |
| #make screenshot | |
| scrot ~/lockscreen.png | |
| #apply blur | |
| mogrify -filter Gaussian -resize 20% -define filter:sigma=1 -resize 500% ~/lockscreen.png | |
| #mogrify -blur 0x8 ~/lockscreen.png |
| #!/bin/bash | |
| # | |
| # Automate mysql secure installation for debian-baed systems | |
| # | |
| # - You can set a password for root accounts. | |
| # - You can remove root accounts that are accessible from outside the local host. | |
| # - You can remove anonymous-user accounts. | |
| # - You can remove the test database (which by default can be accessed by all users, even anonymous users), | |
| # and privileges that permit anyone to access databases with names that start with test_. |
| Running shell scripts that have contain sudo commands in them from jenkins might not run as expected. To fix this, follow along | |
| Simple steps: | |
| 1. On ubuntu based systems, run " $ sudo visudo " | |
| 2. this will open /etc/sudoers file. | |
| 3. If your jenkins user is already in that file, then modify to look like this: | |
| jenkins ALL=(ALL) NOPASSWD: ALL | |
| 4. save the file by doing Ctrl+O (dont save in tmp file. save in /etc/sudoers, confirm overwrite) | |
| 5. Exit by doing Ctrl+X | |
| 6. Relaunch your jenkins job |
This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).
$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
| import mongoose from 'mongoose'; | |
| import _ from 'lodash'; | |
| import dotize from 'dotize'; | |
| ApplicationSchema.methods.upsertRelease = function(query, object) { | |
| const application = this; | |
| // Create an object from query using dot notation instead of objects ('releases.github.id') | |
| const dotQuery = dotize.convert(query, 'releases'); | |
| // Create an object of values to update to, uses mongoose's $ operator |
| import React from 'react' | |
| import axios, { post } from 'axios'; | |
| class SimpleReactFileUpload extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state ={ | |
| file:null | |
| } |