Skip to content

Instantly share code, notes, and snippets.

View irfanbaigse's full-sized avatar
👨‍💻
JAVA - AWS - Flutter - MT5/MT4 - PHP - Node.js

Irfan Baig irfanbaigse

👨‍💻
JAVA - AWS - Flutter - MT5/MT4 - PHP - Node.js
View GitHub Profile
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then

Pipeline version 1

pipeline {
  agent { label "linux" }
  stages {
    stage('Hello') {
      steps {
        sh '''
          aws --version
        '''
getStringValuesSF() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
//Return String
String stringValue = prefs.getString('stringValue');
return stringValue;
}
getBoolValuesSF() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
//Return bool
bool boolValue = prefs.getBool('boolValue');
@yunyu
yunyu / snapping_list_view.dart
Last active October 1, 2023 02:32
A Flutter PageView replacement/snapping ListView for fixed-extent items
import "package:flutter/widgets.dart";
import "dart:math";
class SnappingListView extends StatefulWidget {
final Axis scrollDirection;
final ScrollController controller;
final IndexedWidgetBuilder itemBuilder;
final List<Widget> children;
final int itemCount;
@MithraTalluri
MithraTalluri / BinarySearchConditions.csv
Last active March 7, 2022 02:20
Conditions for Binary Search
low high mid while(?)
mid + 1 mid - 1 low + ((high - low) / 2) low <= high
mid + 1 mid low + ((high - low) / 2) low < high
mid mid - 1 low + ((high - low + 1) / 2) low < high
mid mid X (infinite loop) X (invalid)
@wkliwk
wkliwk / btt.sh
Last active October 11, 2024 07:27
BTT reset trial time
# BetterTouchTool reset trial time
# ** All preference will reset
echo "remove ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist"
rm -rf ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist
echo "Done"
echo "remove ~/Library/Application\ Support/BetterTouchTool/"
rm -rf ~/Library/Application\ Support/BetterTouchTool/
echo "Done"
@boeledi
boeledi / shared_preferences.dart
Last active January 28, 2024 22:23
Sample to show a way of using the SharedPreferences in a build
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
List<String> _languages = <String>['de','en','es','fr','it','nl','pt'];
class TestPage extends StatefulWidget {
@override
_TestPageState createState() => _TestPageState();
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 24, 2024 15:43
crack activate Office on mac with license file
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active November 20, 2024 19:26
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@enricofoltran
enricofoltran / main.go
Last active October 3, 2024 14:08
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"