Skip to content

Instantly share code, notes, and snippets.

View chunkyguy's full-sized avatar

Sidharth Juyal chunkyguy

View GitHub Profile
@Josh-Tucker
Josh-Tucker / feeds.opml
Last active July 7, 2023 15:14
HN User Blogroll OPML
<?xml version='1.0' encoding='utf-8'?>
<opml version="1.0">
<head />
<body>
<outline text="https://xeiaso.net" type="rss" xmlUrl="https://xeiaso.net/blog.rss" />
<outline text="https://fasterthanli.me/" type="rss"
xmlUrl="https://fasterthanli.me/index.xml" />
<outline text="https://matt-rickard.com" type="rss" xmlUrl="/rss/" />
<outline text="https://jmmv.dev/" type="rss" xmlUrl="/feed.xml" />
<outline text="https://paulstamatiou.com" type="rss"
@maluoi
maluoi / colorspace_cubehelix.cpp
Created November 11, 2020 03:20
Converts cubehelix HSL to RGB
// Reference here: http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/
skg_color128_t skg_col_helix128(float h, float s, float l, float alpha) {
const float tau = 6.28318f;
l = fminf(1,l);
float angle = tau * (h+(1/3.f));
float amp = s * l * (1.f - l);
float a_cos = cosf(angle);
float a_sin = sinf(angle);
float r = l + amp * (-0.14861f * a_cos + 1.78277f * a_sin);
@IsaacXen
IsaacXen / README.md
Last active July 17, 2024 08:21
(Almost) Every WWDC videos download links for aria2c.
@Kryzarel
Kryzarel / EasingFunctions.cs
Last active July 19, 2024 22:40
C# Easing Functions
using System;
namespace Kryz.Tweening
{
// Made with the help of this great post: https://joshondesign.com/2013/03/01/improvedEasingEquations
// --------------------------------- Other Related Links --------------------------------------------------------------------
// Original equations, bad formulation: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js
// A few equations, very simplified: https://gist.github.com/gre/1650294
// Easings.net equations, simplified: https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
@AvdLee
AvdLee / DarwinNotificationCenter.swift
Last active June 27, 2024 13:40
A notification center for Darwin Notifications. MIT License applies.
//
// DarwinNotificationCenter.swift
//
// Copyright © 2017 WeTransfer. All rights reserved.
//
import Foundation
/// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling.
public struct DarwinNotification {
@douglashill
douglashill / main.m
Last active October 6, 2023 18:10
A minimal iOS 13 app that is set up in Objective-C rather than using a storyboard and UIApplicationSceneManifest
@import UIKit;
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@end
@implementation SceneDelegate
@synthesize window = _window;
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
@tomaszpolanski
tomaszpolanski / golden_files_test.dart
Last active October 5, 2020 10:13
Golden Files testing in Flutter
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
setUp(() {
// Limits viewport in tests to size of 100, 100 to decrease the size of
// the pngs
WidgetsBinding.instance.renderView.configuration =
TestViewConfiguration(size: const Size(100, 100));
});
@cotkjaer
cotkjaer / CGRect+Center.swift
Last active November 23, 2023 06:15
Swift extensions to add "center" to CGRect
extension CGRect
{
/** Creates a rectangle with the given center and dimensions
- parameter center: The center of the new rectangle
- parameter size: The dimensions of the new rectangle
*/
init(center: CGPoint, size: CGSize)
{
self.init(x: center.x - size.width / 2, y: center.y - size.height / 2, width: size.width, height: size.height)
@mmorris
mmorris / wwdc_2012_urls.txt
Created July 7, 2016 13:41
WWDC 2012 HD video URL list
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_307__building_great_newsstand_apps.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_311__building_and_distributing_custom_b2b_apps_for_ios.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_304__events_and_reminders_in_event_kit.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_300__getting_around_using_map_kit.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_306__integrating_with_facebook_twitter_and_sina_weibo.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_301__introducing_passbook_part_1.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_309__introducing_passbook_part_2.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_3
@kgrz
kgrz / workaround.md
Created June 20, 2016 05:12
Possible workaround for installing nokogiri 1.6.8 on OSX with brewed libxml2 2.9.4

Problem:

The following commands fail on OSX:

gem install nokogiri
gem install nokogiri -- --use-system-libraries
gem install nokogiri -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-xml2-dir=/usr/local/opt/libxml2

Version: