Skip to content

Instantly share code, notes, and snippets.

View JonnyDaenen's full-sized avatar

Jonny Daenen JonnyDaenen

View GitHub Profile
@psychemedia
psychemedia / GPT4all-langchain-demo.ipynb
Last active December 21, 2023 17:30
Example of running GPT4all local LLM via langchain in a Jupyter notebook (Python)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vividvilla
vividvilla / osxtweaks
Created January 8, 2020 10:45 — forked from webdevbrian/osxtweaks
Brian's List of OSX Tweaks for web developers
#OSX Tweaks:
===========
- Most need reboot to show changes
- Most of these tweaks are just for speed, but some are specific for development
- All of these are to be ran in terminal. The commands to be copy and pasted start after the less-than sign.
- I'm not responsible for any adverse effects to your computer, at all.
##Increase the speed of OS X dialogs boxes:
@ihommani
ihommani / StarterPipeline.java
Created September 4, 2018 13:38
A dataflow pipeline listening to a PubSub topic. Pipeline reenqueue a message to the same topic and a specific action if it is the only received message
package com.ihommani.dataflow.starter;
import lombok.extern.slf4j.Slf4j;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubIO;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubMessage;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubOptions;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.Description;
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@jerome-labidurie
jerome-labidurie / index.html
Created October 17, 2015 14:01
Synology SSO server login example
<html>
<head>
<!-- include Synology SSO js -->
<script src="http://ds:5000/webman/sso/synoSSO-1.0.0.js"></script>
</head>
<body>
<script>
/** Display login/logout button.
@mwanji
mwanji / Java8NonRepeatingString.java
Last active September 18, 2020 09:31
A Java 8 adaptation of code to find the first non-repeated letter in a string. Original found here: http://javahungry.blogspot.com/2013/12/first-non-repeated-character-in-string-java-program-code-example.html#.UsFH_N8Q8ak
import java.util.*;
import java.util.function.*;
import java.util.stream.Collectors;
import static java.util.function.Function.identity;
public class NonRepeatingLetter {
public static void main(String[] args) {
findFirstNonRepeatingLetter(args[0], System.out::println);
}
@Atem18
Atem18 / gist:4696071
Last active April 19, 2024 11:18 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.

******************************************************************** Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor********************************************************************

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"