Skip to content

Instantly share code, notes, and snippets.

View bintsiful's full-sized avatar
💭
I may be slow to respond.

Benjamin Intsiful bintsiful

💭
I may be slow to respond.
View GitHub Profile
Dim objShell, lngMinutes, boolValid
Set objShell = CreateObject("WScript.Shell")
lngMinutes = InputBox("Hello! How long you want to keep your system awake?" & Replace(Space(5), " ", vbNewLine) & "Enter minutes:", "Awake Duration") 'we are replacing 5 spaces with new lines
If lngMinutes = vbEmpty Then 'If the user opts to cancel the process
'Do nothing
Else
On Error Resume Next
Err.Clear
boolValid = False
lngMinutes = CLng(lngMinutes)
@bintsiful
bintsiful / XAML Issue
Created December 7, 2022 13:07
I am trying to fit this into a small screen
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:effects="clr-namespace:Handheld.Effects"
x:Class="Handheld.Modules.Inventur.Page5130"
Title="{Binding Title}"
Visual="Material"
BackgroundColor="{AppThemeBinding
Dark={StaticResource WindowBackgroundColorDark},
Light={StaticResource WindowBackgroundColor}}">
@bintsiful
bintsiful / iterm2-solarized.md
Last active February 2, 2021 22:09 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
@bintsiful
bintsiful / Apache Tomcat 8 Start stop script init.d script
Created December 28, 2019 13:32 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
@bintsiful
bintsiful / is_apex_session_cloned.sql
Created June 4, 2019 12:38 — forked from Dani3lSun/is_apex_session_cloned.sql
Function to check if an Oracle APEX session got cloned
CREATE OR REPLACE FUNCTION is_apex_session_cloned RETURN BOOLEAN IS
--
l_referer VARCHAR2(4000);
l_referer_query_string VARCHAR2(4000);
l_session_before NUMBER;
l_bool BOOLEAN := FALSE;
-- cursor to find session id of referer (page before)
-- 3rd splitted part holds APEX session id
CURSOR l_cur_session_before IS
SELECT to_number(referer_tab.column_value) AS session_before