Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🌊🎵 🎧🚀

Khan 'Sadh' Mostafa nafSadh

💭
🌊🎵 🎧🚀
View GitHub Profile
View css-overview-2018.md
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
View disqus-github-pages.html
{% 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
@nafSadh
nafSadh / commit_counta.ps1
Created Sep 2, 2016
Gives mercurial commit count for each file in a directory
View commit_counta.ps1
dir -r | % { New-Object PSObject -Property `
@{ `
Count = hg log -q $_.Name | wc -l; `
FileName = $_.Name; `
}} `
| % { $_.Count + ' -- ' + $_.FileName; }
@nafSadh
nafSadh / ListMethods.py
Created Jun 30, 2015
This is a simple python script that can list all the methods in a file.
View ListMethods.py
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)
View votecnt.py
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]