Skip to content

Instantly share code, notes, and snippets.

@tikolakin
tikolakin / fish_alias.md
Last active May 2, 2024 14:21
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name

@cessor
cessor / pympstore.py
Created November 11, 2017 09:14
Multiprocessing & Sqlite Example
import sqlite3
import multiprocessing
'''
This program starts a daemon process that listens on a queue.
It then starts 10 processes that place integers in the queue.
The listening daemon pulls the integers out of the queue and
stores them in the database.
'''
DB_FILENAME = 'db.sqlite'
@Edward-H
Edward-H / cobol-mode.el
Last active May 2, 2024 14:20
An Emacs mode for COBOL code. It features syntax highlighting for most modern dialects, indentation, support for free- and fixed-format code and code skeletons.
;;; cobol-mode.el --- Mode for editing COBOL code -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2017 Edward Hart
;; Author: Edward Hart <edward.dan.hart@gmail.com>
;; Maintainer: Edward Hart
;; Version: 1.0.0
;; Created: 9 November 2013
;; Keywords: languages
@FleshMobProductions
FleshMobProductions / AudioPreviewer.cs
Last active May 2, 2024 14:17
Play an AudioClip asset in Unity by double clicking on it without external applications being opened
using System;
using System.Reflection;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;
// Source and Credit: FREE Audio Preview Tool For Unity Tutorial (by Warped Imagination) 2022-12-05
// https://www.youtube.com/watch?v=Gd8M1Ychis8
public static class AudioPreviewer
{
@michaellwest
michaellwest / FindRevisionIssues.ps1
Last active May 2, 2024 14:17
Sitecore PowerShell Extensions script to rename items. Workaround for an issue in SXA where items are not published because the revision is missing on the item (even though the Content Editor shows one). Sitecore Support public reference number 522438
$matchedItems = [System.Collections.ArrayList]@()
$revisionFilter = @("9323dec0-9b37-4fae-b87c-2dc12cbea0f2")
Get-ChildItem -Path "master:\media library" -Recurse |
Where-Object { [string]::IsNullOrEmpty($PSItem["__revision"]) -or $revisionFilter -contains $PSItem["__revision"] } |
ForEach-Object { $matchedItems.Add([PSCustomObject]@{"ItemId"=$PSItem.ID; "RevisionId"=$PSItem["__revision"]; "ItemPath"=$PSItem.ItemPath}) > $null }
$matchedItems | Show-ListView
@ryan-mooore
ryan-mooore / .skhdrc
Last active May 2, 2024 14:16 — forked from pkazmier/.skhdrc
# Updated from https://gist.github.com/pkazmier to support yabai
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.
@skokasik
skokasik / Javascript: SPServices (add, delete, update custom list)
Last active May 2, 2024 14:14
Javascript: SPServices (add, delete, update)
var SharePointFunctions = function(rootSP) {
this.spSiteUrl = rootSP;
};
SharePointFunctions.prototype = {
retrieveListPromise : function(spListName, viewCaml, filterCaml, asyncStatus) {
var spPromise;
if (viewCaml !== undefined)
{
spPromise = $().SPServices({
@doiftrue
doiftrue / disable-aggressive-updates.php
Created January 16, 2024 20:18
[wpkama embed] https://wp-kama.com/2345 Disable Aggressive Updates.
<?php
/**
* Disable forced checking for new WP, plugins, and theme versions in the admin panel,
* so that it doesn't slow down when you haven't visited for a long time and then visit...
* All checks will happen unnoticed through cron or when you visit the "Dashboard > Updates" page.
*
* @see https://wp-kama.ru/filecode/wp-includes/update.php
* @author Kama (https://wp-kama.ru)
* @version 1.1
@TrevTV
TrevTV / ArcOn10.md
Last active May 2, 2024 14:11
Guide to installing Arc Browser on Windows 10

As this is not an official way of installing Arc, if you encounter any issues do NOT report them to the developers, they did not intend for people to be running Arc on Windows 10.

This guide is a bit more manual since I wanted to respect the developers' wishes and not directly link any downloads to the beta of Arc.

I don't know how this will work with updates, you may just need to redo the process to update it, but I'm not sure

  1. Install this font: https://aka.ms/SegoeFluentIcons (this fixes the icons since Windows 10 doesn't have this font installed by default)
  2. Download the Arc appinstaller and open it in notepad/some other text editor
  3. Copy everything inside and paste it into this website: https://codebeautify.org/xmlviewer (this is optional, but it makes reading and copying from the file easier)
  4. Find the mainpackage @Uri, it should end in Arc.x64.msix, and open that in a new tab. It should download that msix file.