Skip to content

Instantly share code, notes, and snippets.

View almgwary's full-sized avatar
👑
Hello World

Amr Ibrahim almgwary

👑
Hello World
View GitHub Profile
@almgwary
almgwary / clone-all-twitter-github-repos.sh
Created August 30, 2024 01:59 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
let prevent;
const stop = () => {
prevent = true;
chrome.runtime.sendMessage({
type: "msg",
msg: "start again",
running: false
});
};
@almgwary
almgwary / data_as_inserts.sql
Last active November 4, 2018 16:34 — forked from velppa/data_as_inserts.sql
This script exports data from tables as insert statements. Useful for exporting data from static dictionary tables. #oracle #sqlplus
set heading off
set linesize 1000
rem set pagesize 50000
set echo off
set serveroutput on
SET FEEDBACK OFF
SPOOL out.sql
DECLARE
cur SYS_REFCURSOR;
@almgwary
almgwary / sliceSlotsByAverageTime.js
Created January 15, 2018 14:35
change slot of [from][to] filed into slots of range equal averageTimetime
const sliceSlotsByAverageTime = (slots,averageTime)=>{
let newSlots = [] ;
// loop over slots
slots.forEach((slot)=>{
let from = new Date(slot.from);
let end = new Date(slot.to);
let loop = 1 ;