Skip to content

Instantly share code, notes, and snippets.

View MiguelRipoll23's full-sized avatar
🍿

Miguel Ripoll MiguelRipoll23

🍿
View GitHub Profile
@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active May 4, 2024 03:16
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@mpern
mpern / OnRequestScript.groovy
Last active September 21, 2020 22:48
Simulate HTTP Auth for SOAP UI Mock Server
import com.eviware.soapui.support.types.StringToStringsMap
def authSucceeded = false
// Add those custom properties to your mock server
def user = mockRunner.mockService.getPropertyValue("httpUsername")
def pass = mockRunner.mockService.getPropertyValue("httpPassword")
log.info "checking for credentials: $user:$pass"
// get the request headers
StringToStringsMap headers = mockRequest.getRequestHeaders()
@joepie91
joepie91 / express-server-side-rendering.md
Last active February 20, 2024 20:52
Rendering pages server-side with Express (and Pug)

Terminology

  • View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
  • View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
  • HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
  • String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
@falkorichter
falkorichter / build.gradle
Created July 1, 2014 20:37
Android-L gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion "android-L"
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "sensorbeacon.android.sensorberg"
minSdkVersion 'L'
targetSdkVersion 'L'
var attempts = 1;
function createWebSocket () {
var connection = new WebSocket();
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...