Skip to content

Instantly share code, notes, and snippets.

View bullshit's full-sized avatar
👨‍🔬
Solutionst

Oskar bullshit

👨‍🔬
Solutionst
View GitHub Profile
@bullshit
bullshit / erpnext_magento.php
Created April 19, 2024 06:32 — forked from rmehta/erpnext_magento.php
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
@bullshit
bullshit / Foreman_Puppet_7.x_Raspbian.md
Created November 16, 2022 22:55 — forked from gawainXX/Foreman_Puppet_7.x_Raspbian.md
How to add a Raspberry Pi 10 (Buster) agent device to Foreman for management and Remote Execution

How to add a Raspberry Pi 10 (Buster) agent device to Foreman for management and Remote Execution

These instructions were tested on a pi 3b and 4b with the latest version of raspbian (Raspbian GNU/Linux 10 (Buster)).

This guide assumes basic competency with the command line. It also assumes your Foreman Proxy/Server and the client device you are going to be managing meet the following criteria.

Raspberry Device Configuration Requirements

  • OS is Raspbian 10 Buster (armhf)
  • Root is enabled with a set password.
  • SSH is enabled with PermitRootLogin is either set to prohibit-password or yes in /etc/ssh/sshd_config
sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
@bullshit
bullshit / Fedora34Hibernation.md
Created December 7, 2021 14:17 — forked from eloylp/Fedora35Hibernation.md
Fedora 34 hibernation with swapfile, only for hibernation and resume

Fedora34 hibernation

This guide helps to configure the hibernation on a default Fedora34 installation by using a swap file. The Fedora34 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
@bullshit
bullshit / NewtworkManagerConnection.cs
Created September 27, 2020 09:00 — forked from Ummon/NewtworkManagerConnection.cs
To control the Network Manager on Ubuntu with DBUS and C#/Mono. D-BUS documentation: * The D-BUS Network Manager: http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Settings.Connection * The D-BUS C# free library: https://github.com/mono/dbus-sharp and http://www.ndesk.org/DBus_Documentation * D-B…
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using DBus;
namespace IPChangerPrototype
{
public enum Method
##
## SNMP Input Plugin
##
## QNAP TS-431X
##
[[inputs.snmp]]
# List of agents to poll
agents = [ "10.1.1.31" ]
# Polling interval
interval = "60s"
@bullshit
bullshit / nginx.conf
Created October 15, 2018 15:52 — forked from morhekil/nginx.conf
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@bullshit
bullshit / unifi-raspberry_pi-instructions.sh
Created December 6, 2017 08:22 — forked from bwbaugh/unifi-raspberry_pi-instructions.sh
Installing Ubiquiti UniFi Controller 5 on Raspberry Pi.
# Mirror of the instructions available here:
# http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/
#
# These commands CANNOT be run in a script.
# They're just for reference.
# Install on Raspbian Jessie, or upgrade from Wheezy.
# Make sure all packages are upgraded (update && upgrade).
@bullshit
bullshit / PHDTest.cpp
Last active June 6, 2017 08:40
Telegraf ISSUE 1827
#include "stdafx.h"
// Example copied from https://msdn.microsoft.com/en-us/library/windows/desktop/aa372633(v=vs.85).aspx
#include <windows.h>
#include <stdio.h>
#include <pdh.h>
#include <pdhmsg.h>
@bullshit
bullshit / jenkins-pipeline.groovy
Created December 1, 2016 00:06 — forked from cyrille-leclerc/jenkins-pipeline.groovy
Jenkins Pipeline Script for maven-release-plugin
#!groovy
docker.image('cloudbees/java-build-tools:0.0.6').inside {
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [
/* [$class: 'UserIdentity', email: 'cleclerc@cloudbees.com', name: 'Jenkins as a Service'], */
[$class: 'WipeWorkspace'],
[$class: 'LocalBranch', localBranch: 'master']],
userRemoteConfigs: [[credentialsId: 'github-credentials', url: 'https://github.com/cyrille-leclerc/my-spring-boot-app.git']]])