Skip to content

Instantly share code, notes, and snippets.

View x0x8x's full-sized avatar
🏠
Working from home

x0x8x x0x8x

🏠
Working from home
View GitHub Profile
@x0x8x
x0x8x / Install PyQt5 on Ubuntu with python3 .md
Created February 19, 2019 14:46 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

# run in "root" folder (e.g /home/datmusic/api.datmusic.xyz/)
chown -R datmusic:www-data storage .env
find storage -type f -exec chmod 664 {} \;
find storage -type d -exec chmod 775 {} \;
chgrp -R www-data storage .env
chmod -R ug+rwx storage .env
@x0x8x
x0x8x / make_cert.sh
Created March 12, 2018 19:36 — forked from m1entus/make_cert.sh
Generating apple push notifications
#!/bin/sh
if [ "$#" != 3 ]; then
echo "Illegal number of parameters, usage: ./make_cert.sh apn_file key_file output_filename"
fi
eval "openssl x509 -in $1.cer -inform DER -out $1.pem -outform PEM"
eval "openssl pkcs12 -nodes -export -inkey $2.key -in $1.pem -out $1.p12"
eval "openssl pkcs12 -nodes -nocerts -out $2.pem -in $1.p12"
eval "cat $1.pem $2.pem > $3.pem"
@x0x8x
x0x8x / create_self_extracting_script.sh
Created March 12, 2018 19:35 — forked from jcward/create_self_extracting_script.sh
Quick bash script to create self-extracting .sh files /w Base64 encoded contents (e.g. binary, zip, etc)
#!/bin/bash
#
# create_self_extracting_script.sh <INPUT_FILE> [<OUTPUT_SCRIPT>]
#
# Creates a self-extracting shell script containing INPUT_FILE as Base64-encoded
# bytes. When executed, the script writes INPUT_FILE and restores its permissions.
#
# (c) Jeff Ward, 2017
# MIT License
@x0x8x
x0x8x / JSONProxy.php
Created March 12, 2018 19:35 — forked from jcward/JSONProxy.php
A PHP JSONP proxy script
<?php header('content-type: application/json; charset=utf-8');
# Curl / proxy parts of this script from:
# https://webster.cs.washington.edu/course-website/16au/lectures/slides/proxy.phps
$url = $_GET['src'];
$data = array();
# Open the cURL session
$curlSession = curl_init();
@x0x8x
x0x8x / Readme.txt
Created March 12, 2018 19:35 — forked from jcward/Readme.txt
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
1) Generate a private key and certificate signing request:
openssl genrsa -out ios_distribution.key 2048
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/[email protected], CN=Example, C=US'
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create
- choose Production -> App Store and Ad Hoc
3) Download the resulting ios_distribution.cer, and convert it to .pem format:
@x0x8x
x0x8x / steps-ios-certificates.txt
Created March 12, 2018 19:35 — forked from glauberportella/steps-ios-certificates.txt
Generate iOS certificates from "not OS X" machines
It is a bit of a confusing process. This is a copy/paste from some old documentation.
Before going through these steps, you must have OpenSSL installed (https://www.openssl.org/related/binaries.html).
Using a command line window:
1. cd C:\OpenSSL-Win32\bin (or path to where you installed SSL)
2. openssl genrsa -out ios_distribution.key 2048
3. openssl req -new -key ios_distribution.key -out CertificateSigningRequest.certSigningRequest -subj /emailAddress=YOUEMAILADDRESS, CN=YOUR NAME, C=COUNTRYCODE
4. Go to https://developer.apple.com/ios/manage/certificates/team/distribute.action68 and sign in. Go to “certificates” under iOS.
@x0x8x
x0x8x / callback-example.js
Created February 22, 2018 00:41 — forked from maheshsundaram/callback-example.js
geckoboard-node
const gb = require('geckoboard')('api key'); [5/868]
gb.set('ping', function(err, res) {
if (err) {
console.error(err);
return;
}
gb.set('create', 'dwarf', {
fields: {
quantity: {
23.21.191.184
23.23.160.105
23.23.160.138
23.23.164.233
23.23.165.66
23.23.182.172
23.23.196.105
23.23.205.140
50.16.234.49
50.16.244.16
@x0x8x
x0x8x / get_incident_details_csv.py
Created December 13, 2017 11:17 — forked from lfepp/get_incident_details_csv.py
Output PagerDuty incident details to a CSV
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright