Skip to content

Instantly share code, notes, and snippets.

@softius
softius / bootstrap.sh
Last active December 14, 2015 08:39
Removes gradients and/or rounded corners from bootstrap css
# removes rounded corners
grep -v "radius" bootstrap.css > bootstrap-no-radius.css
# removes gradient
grep -v "gradient" bootstrap.css > bootstrap-no-gradient.css
# removes both gradient and rounded corners
grep -v "radius" bootstrap.css | grep -v "gradient" > bootstrap-no-radius-gradient.css
@softius
softius / gradient.sh
Last active July 23, 2017 04:30
Create random gradient backgrounds for your GNOME Desktop
#!/bin/bash
GJSON='/tmp/gradients.json'
GPNG='/tmp/gradient.png'
# Avoid to download file if already exists
if [ ! -f $GJSON ]; then
echo 'Fetching gradients from GitHub ...'
curl -o $GJSON https://raw.githubusercontent.com/ghosh/uiGradients/master/gradients.json 2>/dev/null
fi
@softius
softius / main.ts
Created September 26, 2021 19:28
Default setup for Angular + Datadog
import { datadogLogs as datadog } from '@datadog/browser-logs';
if (environment.production) {
enableProdMode();
datadog.init({
clientToken: environment.datadog.clientToken,
site: environment.datadog.site,
service: environment.datadog.service,
forwardErrorsToLogs: true,
@softius
softius / postman-auth.js
Last active November 12, 2021 09:55
Automatic authentication in Postman
/**
* Ensures that we have a valid token before any request.
*
* To use this, you need to edit the Collection
* 1) select "Bearer Token" and provide `{{accessToken}}` as the Token, under Authorisation tab.
* 2) copy this script into "Pre-request scripts"
*
* Last, you need to define the following variables under the Environment
* baseUrl : API URL ie https://example.com/
* username: The username to connect with