Skip to content

Instantly share code, notes, and snippets.

View acs's full-sized avatar
💭
IoT, Big Data, Cloud, Reactive, TS ... surfing the new waves

Alvaro del Castillo acs

💭
IoT, Big Data, Cloud, Reactive, TS ... surfing the new waves
View GitHub Profile
@acs
acs / open_door_show_panel.lua
Created December 30, 2023 20:39
Open door and show panel
local clickDetector = script.Parent
local candado = clickDetector.Parent.Parent
local puerta = candado.Parent.Puerta
local pared = game.Workspace.Invisible
clickDetector.MouseClick:Connect(function(player)
print("Opening the door", player.Backpack)
local banner = player.PlayerGui.ScreenGui.Frame1
local banner2 = player.PlayerGui.ScreenGui.Frame2
local banner3 = player.PlayerGui.ScreenGui.Frame3
local backpack = player.Backpack
@acs
acs / progress_bar.lua
Created December 17, 2023 20:04
Decrease the size of an object in Roblox (progress bar)
print("Adjusting recharge bar")
local visibleBar = script.Parent.Parent.Parent
local bar = script.Parent
local totalSeconds = 5
local stepSize = bar.Size.X.Offset/totalSeconds
repeat
task.wait(1)
bar.Size = UDim2.new(0, bar.Size.X.Offset-stepSize, 0, bar.Size.Y.Offset)
until bar.Size.X.Offset < 0
@acs
acs / spawn_random.lua
Created December 8, 2023 11:19
Spawn in random location
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
script.Disabled = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local equipped = player.Equipped
local spawns = game.Workspace.spawns
local randSpawn = math.random(1, #spawns:GetChildren())
hit.Parent.HumanoidRootPart.CFrame = game.Workspace:WaitForChild("spawns"):FindFirstChild(randSpawn).CFrame
local HandsFold = game:GetService("ServerStorage").Hands
@acs
acs / roblox_lobby.lua
Last active December 6, 2023 13:14
Code to teleport players if there are enough players in the lobby (not completed yet)
-- Script to teletransport the player to another place (Capitulo 1)
local CAPITULO_1_PLACE_ID = 15504750119
local MIN_PLAYERS_TO_TELEPORT = 2
local playersReadyToTeleport = {}
local teleportPlace = script.Parent
local world = teleportPlace.Parent
local numPlayersReadyBanner = world.Text
@acs
acs / projects.json
Last active December 9, 2019 11:41 — forked from valeriocos/projects.json
IoT projects (git and github repos) in Apache, Eclipse and Linux Foundations
{
"Apache": {
"Camel": {
"git": [
"https://github.com/apache/camel"
],
"github": [
"https://github.com/apache/camel"
]
},
(acs@dellx) ~ $ sortinghat -u root --host mariadb -d eclipse_sh affiliate
Traceback (most recent call last):
File "/usr/local/bin/sortinghat", line 4, in <module>
__import__('pkg_resources').run_script('sortinghat==0.3.1', 'sortinghat')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1504, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.5/dist-packages/sortinghat-0.3.1-py3.5.egg/EGG-INFO/scripts/sortinghat", line 181, in <module>
code = main()
@acs
acs / gist:5c35b016c62a9d71f135490650a16b27
Created April 24, 2017 15:41
Avoid load identities in gelk enrichment
(acs@dellx) (master *$% u=) ~/devel/GrimoireELK $ git diff grimoire_elk/arthur.py
diff --git a/grimoire_elk/arthur.py b/grimoire_elk/arthur.py
index 2d05541..19fc1f7 100755
--- a/grimoire_elk/arthur.py
+++ b/grimoire_elk/arthur.py
@@ -510,7 +510,8 @@ def enrich_backend(url, clean, backend_name, backend_params, ocean_index=None,
logger.info("Adding enrichment data to %s", enrich_backend.elastic.index_url)
- if db_sortinghat:
elasticsearch:
image: elasticsearch:5.1.1
command: elasticsearch -E network.bind_host=0.0.0.0
ports:
- "9200:9200"
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g
kibiter: