Skip to content

Instantly share code, notes, and snippets.

View sjmach's full-sized avatar
💭
I may be slow to respond.

Sundeep Joseph Machado sjmach

💭
I may be slow to respond.
View GitHub Profile
@geerlingguy
geerlingguy / mariadb.yml
Last active January 29, 2024 19:43
Wordpress in Kubernetes K3s on Raspberry Pi
# This manifest assumes 'wordpress' namespace is already present:
#
# kubectl create namespace wordpress
#
# Apply the manifest with:
#
# kubectl apply -f mariadb.yml
---
apiVersion: v1
kind: Secret
// load the AWS SDK
const AWS = require('aws-sdk')
// load CloudFront key pair from environment variables
// Important: when storing your CloudFront private key as an environment variable string,
// you'll need to replace all line breaks with \n, like this:
// CF_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...1Ar\nwLW...2eL\nFOu...k2E\n-----END RSA PRIVATE KEY-----"
const cloudfrontAccessKeyId = process.env.CF_ACCESS_KEY_ID
const cloudFrontPrivateKey = process.env.CF_PRIVATE_KEY
const signer = new AWS.CloudFront.Signer(cloudfrontAccessKeyId, cloudFrontPrivateKey)
@haircut
haircut / Install PIP to user site on macOS.md
Created August 29, 2017 21:50
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

@cutiko
cutiko / AndroidManifest.xml
Last active March 23, 2018 13:44
Firebase Twitter login and Fabric crash solution guid
<!--You can see here, that there are 2 attributes added. First tools:replace="android:supportsRtl" is ment to fix the rtl merge conflict
and android:name=".YourApp" is ment to register the class extending application as your app-->
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="false"
android:theme="@style/AppTheme"
android:name=".YourApp"
@epall
epall / CustomFirefoxProfile.java
Created February 10, 2011 23:22
Setting firefox profile preferences with RemoteWebDriver
import org.openqa.selenium.*;
import org.openqa.selenium.remote.*;
import org.openqa.selenium.firefox.*;
public class CustomFirefoxProfile {
public static void main(String[] args) throws Exception {
DesiredCapabilities capabillities = new DesiredCapabilities("firefox", "3.6.", Platform.WINDOWS);
capabillities.setCapability("job-name", "Fancy Firefox profile");
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.http.phishy-userpass-length", 255);