Skip to content

Instantly share code, notes, and snippets.

View MrwanBaghdad's full-sized avatar
⛈️
Breaking things in the cloud

Marwan MrwanBaghdad

⛈️
Breaking things in the cloud
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mrwanbaghdad on github.
  • I am marwanbaghdad (https://keybase.io/marwanbaghdad) on keybase.
  • I have a public key ASCXjMqLbg53Il3-nJCNEqAbKEQeNMOKEG161gyzf7_1Iwo

To claim this, I am signing this object:

How to open all your python ETL jobs using vim, each is in its own tab ordered by their line number counter

  1. Get the modules and their line counts
find /path/to/dir/ --iname "your_jobs_filename_pattern.py" -exec wc -l {} \
function FindProxyForURL(url, host){
if(dnsDomainIs(host, 'medium.com') || dnsDomainIs(host, 'codenames.game'))
return "SOCKS 127.0.0.1:5555"
return "DIRECT"
}
#!/bin/bash
echo \'display notification with title \"$@\"\' | xargs -I {} osascript -e {}
@MrwanBaghdad
MrwanBaghdad / doodle_gen_text.py
Last active December 3, 2016 21:28
Generating times for periods as an api format for doodle
# http://doodle.com/create?type=text&local=en&title=registeredstudents
# options(
# Sun 1:40 ~ 3:10
# Mon 10:10 ~ 11:40
# Mon 11:50 ~ 1:20
# Mon 1:40 ~ 3:10
@MrwanBaghdad
MrwanBaghdad / rand list of strings.py
Created August 30, 2016 02:05
generating random list of ascii strings for python
import math;
import random;
import string;
def str_gen(n):
return "".join(random.sample(string.ascii_letters,n));
def list_gen(m,n):
li=[];
for i in range(1,n):
li.append(str_gen(m));
@MrwanBaghdad
MrwanBaghdad / doodle form to google spreadsheet.js
Created June 18, 2016 06:51
Sorting doodle form as a spreadsheet by time, Every Name with entry has it's time. Google App script
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var data= sheet.getRange("A5:P50");
var cell;
var i,j;
Logger.log(data.getWidth());
// for(i=1;i<data.getHeight();i++){
//
n= -3:3;
x=[2 4 -3 1 -5 4 7];
[y1,n1]= sigshift(n,x,3);
y1=2*y1;
[y2,n2]= sigshift(n,x,-4);
y2= 3*y2;
[y3,n3]= sigadd(n1,y1,n2,y2);
[y3,n3]=sigadd(n3,y3,n,-x);
stem(n3,y3);
hold on;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.
void main(){
console.log("hello world");
}