Skip to content

Instantly share code, notes, and snippets.

View cisano-arelia's full-sized avatar
🤔
The menu is not the meal

C'isano Arelia cisano-arelia

🤔
The menu is not the meal
  • Netherlands
View GitHub Profile
@cisano-arelia
cisano-arelia / build-tmux.sh
Last active July 21, 2019 17:44
Script to build a static tmux for CoreOS
#!/usr/bin/env bash
#Author: https://groups.google.com/forum/#!topic/coreos-dev/JAeABXnQzuE
pushd $(dirname $0) > /dev/null; CURRABSPATH=$(readlink -nf "$(pwd)"); popd > /dev/null; # Get the directory in which the script resides
set -x
MUSLPKG="musl:musl.tgz:http://www.musl-libc.org/releases/musl-1.1.14.tar.gz"
LEVTPKG="libevent:libevent2.tgz:https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz"
TMUXPKG="tmux:tmux.tgz:https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
NCRSPKG="ncurses:ncurses.tgz:http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz"
TEMPDIR="$CURRABSPATH/tmp"
TMPLIB="tempinstall/lib"
{
"objectIdFieldName": "peilbuis_id",
"globalIdFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
@cisano-arelia
cisano-arelia / ampache.cfg.php
Created May 11, 2016 09:00
Ampache configuration
;#<?php exit(); ?>##
;#########################################################
; General Config #
;#########################################################
; This value is used to detect quickly
; if this config file is up to date
; this is compared against a value hard-coded
; into the init script
config_version = 34
@cisano-arelia
cisano-arelia / apex controller
Last active October 24, 2017 13:25
In the Area component
public class InTheArea {
@AuraEnabled
public static String getLocal (String searchTerm, Decimal lat, Decimal lon) {
String url = 'https://th-yelp-locator.herokuapp.com/search?address=' + lat +','+ lon + '&term=' + EncodingUtil.urlEncode(searchTerm, 'UTF-8');
String resultList = getHttp(url);
return resultList;
}
private static String getHttp (String url) {
HttpRequest req = new HttpRequest();
@cisano-arelia
cisano-arelia / apex controller
Created October 26, 2017 08:33
KvKProfile lightning component
public class KvKProfile {
@AuraEnabled
public static String getProfile (Id recordId) {
Account acc = [select kvk__c from account where id=:recordId];
return getHttp('https://api.kvk.nl/api/v2/testprofile/companies?kvkNumber='+acc.kvk__c);
}
private static String getHttp (String url) {
HttpRequest req = new HttpRequest();
Http http = new Http();
  • Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
  • Installation date: 16-08-2019
  • Additional notes based on my own experience
  • EFI boot
  • Ubuntu 19.04
  • This should work on any computer. Only the RAID > AHCI change described below and the device name for the nvme ssd drive are specific to this laptop.
  • The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
  • The process was conducted on Dell's XPS 15 9560 (2017) with specs:
  • CPU: i7-7700HQ
@cisano-arelia
cisano-arelia / cmdline.txt
Last active July 4, 2022 17:31
Raspberry PI Zero OTG Network
console=serial0,115200 console=tty1 root=PARTUUID=c36e454f-02 rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_ether
@cisano-arelia
cisano-arelia / install ldapd
Last active September 15, 2022 08:45
debian ldap
apt install libnss-ldapd libpam-ldapd
dpkg-reconfigure libpam-runtime (if needed)
@cisano-arelia
cisano-arelia / adMemberOf.ldif
Last active September 15, 2022 11:10
ADS sAMAccountName + memberOF + openSSHPublicKey
dn: cn=microsoft, ou=schema
objectclass: metaSchema
objectclass: top
cn: microsoft
dn: ou=attributetypes, cn=microsoft, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: attributetypes
frontend ssl
mode tcp
bind 0.0.0.0:443 name frontend-ssl
option tcplog
log global
tcp-request inspect-delay 3s
tcp-request content accept if { req.ssl_hello_type 1 }
use_backend main-ssl if { req.ssl_hello_type 1 }
use_backend ssh if !{ req.ssl_hello_type 1 } { payload(0,7) -m bin 5353482d322e30 }
use_backend openvpn if !{ req.ssl_hello_type 1 } !{ req.len 0 }