This file contains hidden or 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
<?php | |
const TESTING = false; | |
const FILE_NAME = ".hits"; | |
const DAYS = 10; | |
const PASSWORD = "YOUR PASSWORD HERE"; | |
$user_agent = strip_tags($_SERVER['HTTP_USER_AGENT']); | |
$bots = ["bot", "slurp", "spider", "crawler"]; | |
foreach ($bots as $bot) { | |
if (stripos($user_agent, $bot) !== false) exit(); |
This file contains hidden or 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
extends Node2D | |
const SPEED = 100 | |
var max_x | |
var pos = 0 | |
var terrain | |
var p_bg | |
var p_layer |
This file contains hidden or 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
shader_type spatial; | |
uniform vec3 target = vec3(1.0, 0.0, 0.0); | |
uniform float alpha = 1.0; | |
uniform vec4 globe_color : hint_color = vec4(0.1, 0.5, 0.99, 0.5); | |
uniform vec4 shield_color : hint_color = vec4(0.99, 0.0, 0.1, 1.0); | |
varying float ang; | |
void vertex() { |
This file contains hidden or 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
func _on_Tree_item_collapsed(_item): | |
if ready: | |
g.state.ci[cid] = [] | |
scan_children(tree.get_root()) | |
g.save_state() | |
func scan_children(root): | |
var item = root.get_children() | |
while item: |
This file contains hidden or 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
func _on_Tree_gui_input(event): | |
if event is InputEventMouseMotion: | |
$Bar.rect_position = Vector2(2, get_y(event.position.y)) | |
$Bar.rect_size = Vector2(rect_size.x - 12, 17) | |
func get_y(y): | |
var step = 22 | |
var dy = tree.get_scroll().y | |
return floor(y / step) * step + 7 - dy + step * floor(dy / step) |
This file contains hidden or 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
shader_type canvas_item; | |
void fragment() { | |
vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb; | |
if (c.r < 0.3 || c.g < 0.3 || c.b < 0.3) c *= 1.2; | |
COLOR.rgb = c; | |
} |
This file contains hidden or 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
tool | |
extends Control | |
# Set a default value and call the setter and getter functions as needed | |
# But this txt value IS NOT SAVED in an instantiated scene | |
export var txt = "Y0" setget set_text, get_text | |
# But this text value IS SAVED in an instantiated scene | |
# And it is displayed in the Inspector panel (we don't want that to happen) | |
export var text: String |
This file contains hidden or 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
extends Control | |
# Scene structure: | |
# Main (Control Node) | |
# - HBox | |
# -- Multi-line Text label of 400px min width containing a bunch of text | |
# -- Control node that expands horizontally | |
# c (canvas node) | |
export var token = "#" # Marks start and end points of text to draw a line over |
This file contains hidden or 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
/* | |
* Bicyle computer Arduino Uno code | |
* Author: Andrew M Wilkes | |
* 2016-08-12 | |
*/ | |
/* | |
* Notes | |
* Switch/sensor debounce is implemented by assigning an INT value to the switch variable that is set on the initial falling edge of the switch. | |
* The switch action is then ignored until the value has been counted down to zero. |
This file contains hidden or 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
func _ready(): | |
if OS.get_name() == "Windows": | |
var screen_size = OS.get_screen_size() | |
var window_size = OS.get_window_size() | |
OS.set_window_position(Vector2((screen_size.x - window_size.x) * 0.5, 0)) | |
OS.set_window_size(Vector2(window_size.x, screen_size.y - 75)) # Allow for the tray bar |