Skip to content

Instantly share code, notes, and snippets.

View erdnussflips's full-sized avatar

Philipp S. erdnussflips

View GitHub Profile
@tajnymag
tajnymag / tinder.user.js
Last active May 16, 2024 11:37
Tinder Deblur Userscript (ARCHIVED and DEPRECATED, see https://github.com/tajnymag/tinder-deblur)
// ==UserScript==
// @name Tinder Deblur
// @namespace Violentmonkey Scripts
// @match https://tinder.com/*
// @grant none
// @version 1.4
// @author Tajnymag
// @downloadURL https://raw.githubusercontent.com/tajnymag/tinder-deblur/main/tinder.user.js
// @description Simple script using the official Tinder API to get clean photos of the users who liked you
// ==/UserScript==
import Foundation
import XCTest
protocol AutoEquatable: Equatable {}
extension AutoEquatable {
static func ==(lhs: Self, rhs: Self) -> Bool {
var lhsDump = String()
dump(lhs, to: &lhsDump)
@cdiggins
cdiggins / react-best-practices.md
Created January 25, 2018 16:20
React Best Practices
@gschizas
gschizas / AddApplicationToControlledFolder.ps1
Last active March 6, 2022 06:53
Allow all blocked apps to Windows Defender's Controlled folder access (interactively)
$appEvents = Get-WinEvent -LogName "Microsoft-Windows-Windows Defender/Operational" |
Where-Object {$_.Id -eq "1123"}
$allBlockedProcesses = (
$appEvents |
ForEach-Object {
(([xml]$_.ToXml()).Event.EventData.Data |
Where-Object {
$_.Name -eq "Process Name"
}).'#text'
} |
@serdroid
serdroid / gist:7bd7e171681aa17109e3f350abe97817
Created October 17, 2017 12:24
create commit and push to repo during CI build in gitlab
- generate ssh key for gitlab-runner user
- add ssh key to project's deploy keys (project/setting/repository)
add below commands into script section of .gitlab-ci.yml file.
# CI_REPOSITORY_URL contains gitlab-ci-token. replace start of the string up to '@' with git@' and append a ':' before first '/'
# example
# CI_REPOSITORY_URL=https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@example.com/gitlab-examples/ci-debug-trace.git
# should be git@example.com:/gitlab-examples/ci-debug-trace.git
- export PUSH_REPO=$(echo "$CI_REPOSITORY_URL" | sed -e "s|.*@\(.*\)|git@\1|" -e "s|/|:/|" )
@CodeBrauer
CodeBrauer / mount-image-qcow2-from-kvm-on-macos.md
Last active April 17, 2022 09:24
Mount image (qcow2) from KVM on macOS - fastest way? / Convert qcow2 to access files (EXT4 partition)

If you haven't installed any FUSE yet:

brew tap homebrew/fuse
brew install Caskroom/cask/osxfuse
  1. brew install qemu ext4fuse
  2. qemu-img convert -p -O vmdk snapshot.qcow2 system.vmdk This will take some time...
  3. Download and register for a free licence of VMDK Mounter for Mac® OS X and install it.
  4. Reboot your macOS device.
@jonico
jonico / Jenkinsfile
Last active May 11, 2024 09:58
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@jonathan-beebe
jonathan-beebe / swift-to-objc-bool-bridge.m
Created December 22, 2016 15:41
Bridging an optional bool from Swift to Objective-C
@implementation MyObjcClass
. . .
if(mySwiftClassInstance.hasFeatureBridged == nil) {
// handle nil case
}
else if(mySwiftClassInstance.hasFeatureBridged boolValue] == YES) {
// handle true case
}
@agent4788
agent4788 / HS100.java
Last active November 17, 2023 13:34
Mit dieser kleinen API kann man die TP-Link HS100 und HS110 Wlan Steckdosen direkt aus Java ansteuern.
package de.test;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetAddress;
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"