Skip to content

Instantly share code, notes, and snippets.

View nafSadh's full-sized avatar
💭
🌊🎵 🎧⌨🚀

Khan 'Sadh' Mostafa nafSadh

💭
🌊🎵 🎧⌨🚀
View GitHub Profile
import re
def split4level(str):
splits = line.split(" ",1)
if len(splits)>1: return splits
return "",""
def getName(str):
if str.count('(')>1: str = str.replace('(','<',1).replace(')','>',1)
str = re.sub('<.*?>','',str)
name = str.split("(",1)[0]
@nafSadh
nafSadh / ListMethods.py
Created June 30, 2015 06:58
This is a simple python script that can list all the methods in a file.
methodSignature = '(public|protected|private|static|\s) +[\w\<\>\[\]]+\s+(\w+) *\([^\)]*\) *(\{?|[^;])'
import traceback
def main():
import getopt, sys, re
try:
options, args = getopt.getopt(sys.argv[1:], 'i:h', ['input=','help'])
except getopt.GetoptError as err:
# print help information and exit:
print(err) # will print something like 'option -a not recognized'
sys.exit(2)
@nafSadh
nafSadh / commit_counta.ps1
Created September 2, 2016 18:50
Gives mercurial commit count for each file in a directory
dir -r | % { New-Object PSObject -Property `
@{ `
Count = hg log -q $_.Name | wc -l; `
FileName = $_.Name; `
}} `
| % { $_.Count + ' -- ' + $_.FileName; }
@nafSadh
nafSadh / gittest.txt
Created October 24, 2016 15:11
gist test
gittest
{% if page.comments %}
<div class="comments">
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
var disqus_config = function () {
this.page.url = "{{ page.url | prepend: site.url }}"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = "{{ page.url }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
layout comments
default
true
Framework kb JS Grid Overall utility
Bootstrap 12 Y 12 col comprehensive; +plugins
Bulma 10 N fluid many elements and components; customizable; extendable
Concise CSS fluid SCSS based configurable, basic components platform
Foundation 7 Y 12/6/8 comprehensive; some plugins
Kube 85 Y CSS and JS framework
Miligram 2 N 3,4,10 very basic
mini.css 10 N 12 col common components; a flavor tool to generate fine-tuned style
Paper CSS N none fun style sheet