Skip to content

Instantly share code, notes, and snippets.

View tail-call's full-sized avatar
🐚
Conch in the Shell

Maria tail-call

🐚
Conch in the Shell
View GitHub Profile
@austinsonger
austinsonger / MACOS_Cleanup_Utility.sh
Last active March 9, 2025 07:55
macOS Cleanup Script with Launchd: A macOS script to clean system, app, and developer caches, remove temporary files, flush DNS, reset logs, repair disk, and check updates, battery health, and duplicate files.
#!/bin/bash
# Check if script is run as sudo
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Re-running with sudo..."
exec sudo "$0" "$@"
fi
# macOS Cleanup Script with Logging and Error Tracking
LOG_FILE="$HOME/.scripts/logs/cleanup_log_$(date '+%Y%m%d_%H%M%S').log"
import requests
from bs4 import BeautifulSoup
# Function to search Google Scholar
def google_scholar_search(query):
url = "https://scholar.google.com/scholar?q=" + query
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
# Parse results and extract PDF links
Source: https://medium.com/@hooliooo/yet-another-ios-post-about-creating-views-programmatically-9249a7ab1e93
Date: Thu, 27 Jun 2019 08:49:27 +0700
#[1]publisher [2]Medium
[3]Become a member
[4]Sign in
(BUTTON) Get started
Yet Another iOS Post About Creating Views Programmatically!
@mikermcneil
mikermcneil / whats-the-big-deal.md
Last active November 5, 2022 11:03
What's the big deal with Node.js and `await`?

What's the big deal with Node.js and await?

So I really don't like most new things. The only reason I even got involved with Node.js early on was because of its sweeping promise: "One language, spoken by developers across the world." By consolidating parallel efforts, it would accelerate the pace of innovation, and quickly lead to more transformative and disruptive developer tools. It would create tremendous value for software businesses by unlocking efficiencies in the hiring and implementation process. And best of all everyone would waste less time on boring stuff.

Still, there was a problem. While it's true most developers have touched some JavaScript callbacks up there in browserland, in the bowels of the application server, there tends to be a lot more asynchronous things going on. And that causes all sorts of issues. All those callbacks also make for a way steeper

@tularovbeslan
tularovbeslan / UIPageControl dot border
Created August 4, 2017 11:02
UIPageControl dot border
extension UIImage {
class func outlinedEllipse(size: CGSize, color: UIColor, lineWidth: CGFloat = 1.0) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
guard let context = UIGraphicsGetCurrentContext() else {
return nil
}
context.setStrokeColor(color.cgColor)
context.setLineWidth(lineWidth)
@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
var Bar1 = base => class extends base {
componentWillMount(){
super.componentWillMount();
console.log('Bar1');
}
};
var Bar2 = base => class extends base {
componentWillMount(){
super.componentWillMount();
@sentinelt
sentinelt / gist:3f1a984533556cf890d9
Created February 6, 2015 18:44
Program to set arbitrary speed
/*
* Allows to set arbitrary speed for the serial device on Linux.
* stty allows to set only predefined values: 9600, 19200, 38400, 57600, 115200, 230400, 460800.
*/
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <asm/termios.h>
int main(int argc, char* argv[]) {
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing