This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step a name from the arity to the finished string, and get the count of that | |
# 2020-12-12 | |
print "What is the name? " | |
end_test = gets.chomp | |
puts | |
DEBUG = true | |
MODULO_DEBUG = 1_000_000 | |
def string_arity(string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "big" | |
# Step a name from the arity to the finished string, and get the count of that (Crystal Language Version) | |
# 2020-12-12 | |
print "What is the name? " | |
end_test = gets.to_s.chomp # Get the user input, which is the name of whomever you want to compute | |
puts | |
DEBUG = true | |
MODULO_DEBUG_RATE = 1_000_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "twitter" | |
# get these from apps.twitter.com | |
CONSUMER_KEY = "foo" | |
CONSUMER_SECRET = "bar" | |
OAUTH_TOKEN = "blee" | |
OAUTH_TOKEN_SECRET = "baz" | |
TWITTER_USER = "your_username" # needs to be the one associated with keys above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ruby v2.5.3 | |
#gem install fastimage | |
require "fastimage" | |
# Note: assumes MIN_* < MAX_* | |
#Constants############# | |
WIDTH=0 | |
HEIGHT=1 | |
################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to fix a spotify problem (where abba.json prevents the browse page from loading) | |
# Written in Ruby by ArityWolf/Potential Difference (11/08/2018) | |
PATH_TO_SPOTIFY="C:/Users/[windows_username]/AppData/Roaming/Spotify/" | |
PATH_TO_ABBA="C:/Users/[windows username]/AppData/Local/Spotify/Users/[spotify username]/abba.json" | |
if (File.exist? PATH_TO_ABBA) | |
File.delete(PATH_TO_ABBA) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fnumero(string:) | |
words=string.split("") | |
numero=words.inject(0){|result, element| result.ord + element.ord} | |
while (numero.to_s.split("").length > 1) do | |
break if numero % 11==0 | |
numero=numero.to_s.split("").inject(0){|result, element| result.to_i + element.to_i} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//By: grrendel resident - kejento@gmail.com - start: 8/14/2014 - "fin": ??/??/???? | |
//Log: * 8/16/2014 - Changed default PARTITION_BUFFER_BY to 4; certain functions required a change as well and ends with 2(). | |
//Modified functions: | |
// * send_buffer2(); | |
// * get_relative_buffer_location2(); | |
// * add_to_buffer2(); | |
//HAVE: A quick and dirty way to send a 'buffer' of data from "SL_server() -> router() -> home_computer()". 8/15/2014 - 5:36AM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//string to ascii | |
string ASCII = " \n !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; | |
integer ord(string chr) | |
{ | |
if(llStringLength(chr) != 1) return -1; | |
if(chr == " ") return 32; | |
return llSubStringIndex(ASCII, chr); | |
} |