Skip to content

Instantly share code, notes, and snippets.

@Xyncgas
Xyncgas / LimitedList.cs
Created September 14, 2021 16:59 — forked from mjs3339/LimitedList.cs
C# Limited Size List Class
[Serializable]
public class LimitedList<T> : IEnumerable<T>
{
private T[] _thing;
public LimitedList(int maxsize)
{
_thing = new T[maxsize];
MaxSize = maxsize;
}
private int MaxSize { get; }
@Xyncgas
Xyncgas / generate_twitter_bearer_token.rb
Created September 3, 2021 08:16 — forked from jkotchoff/generate_twitter_bearer_token.rb
Example of how to generate and use a Twitter bearer token for the purpose of performing application-only authentication for the Twitter API
# Generate and use an oauth2 bearer token for the Twitter API in Ruby
#
# For Application-Only authentication to the twitter API, a 'bearer token'
# is required to authenticate agains their endpoints for rate limiting
# purposes.
#
# This script generates a bearer token by posting to twitter and then it
# uses that token to poll their API.
#
# Note, the base 64 encoded consumer credentials for the bearer token needs