Skip to content

Instantly share code, notes, and snippets.

@atmosmps
atmosmps / configure-proxy-settings-in-ubuntu-and-fedora.md
Last active May 11, 2024 10:02
Configure Proxy Settings in Ubuntu and Fedora.

Proxy Config Format:

proxy_http=username:password@proxy-host:port

Single User Temporary Settings

When you do not need to force the system to be under the proxy.

  1. Open a Terminal window where you need proxy access.
  2. Set and export the HTTP_PROXY variable.
@dayvsonlima
dayvsonlima / readme.md
Created March 15, 2018 20:56 — forked from romuloctba/readme.md
Install Adobe Photoshop CS6 on Wine (Ubuntu, Elementary OS, Linux Mint)

Step 1. Install the Wine Team Ubuntu PPA

First start by installing Wine btw it's a utility to install windows apps in linux :

open the Terminal and :

   sudo add-apt-repository ppa:ubuntu-wine/ppa     
   sudo apt-get update && sudo apt-get upgrade
   sudo apt-get install wine1.7 winetricks
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 11, 2024 09:59
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@connordavenport
connordavenport / CustomMeasureTool.py
Last active May 11, 2024 09:58
custom measure tool to include guidelines
import math
import merz
from mojo.UI import PostBannerNotification, getDefault, setDefault, UpdateCurrentGlyphView, getGlyphViewDisplaySettings, setGlyphViewDisplaySettings, preferencesChanged, inDarkMode
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber, unregisterGlyphEditorSubscriber, listRegisteredSubscribers
from ufoProcessor.emptyPen import DecomposePointPen
class CustomMeasureTool(Subscriber):
debug = True
@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
@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active May 11, 2024 09:57
MLX Fine-tuning Google Gemma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pesterhazy
pesterhazy / indexeddb-problems.md
Last active May 11, 2024 09:57
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

@alvinwan
alvinwan / MyMetalKernel.py
Last active May 11, 2024 09:56
How to write a minimal, standalone Python script to run Metal (GPU) kernels on Mac
"""
"Hello world" example of using Metal from Python.
This script can be run from the command line just like any other Python file. No
need for Xcode or any other IDE. Just make sure you have the latest version of
Python 3 installed, along with the PyObjC and pyobjc-framework-Metal packages.
"""
import Metal
import ctypes
@quaternioninterpolation
quaternioninterpolation / ImageDOCrossfade.cs
Last active May 11, 2024 09:51
DOTween UnityEngine.UI.Image image cross fade
/** --
** Copyright (C) 2019 by Josh van den Heever
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
** the Software without restriction, including without limitation the rights to
** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
** of the Software, and to permit persons to whom the Software is furnished to
** do so, subject to the following conditions:
**