Skip to content

Instantly share code, notes, and snippets.

View abinashmeher999's full-sized avatar
🤓
Don't mind me, just browsing

Abinash Meher abinashmeher999

🤓
Don't mind me, just browsing
  • Autonomous Ground Vehicle Research Group
  • Kharagpur, India
View GitHub Profile
@seanh
seanh / formatFilename.py
Created April 11, 2009 18:30
Turn any string into a valid filename in Python.
def format_filename(s):
"""Take a string and return a valid filename constructed from the string.
Uses a whitelist approach: any characters not present in valid_chars are
removed. Also spaces are replaced with underscores.
Note: this method may produce invalid filenames such as ``, `.` or `..`
When I use this method I prepend a date string like '2009_01_15_19_46_32_'
and append a file extension like '.txt', so I avoid the potential of using
an invalid filename.
@rei999
rei999 / ansible_php.yml
Created July 17, 2013 23:10
ansible - configure xfs file system, mount ebs, install MySql, php, nginx, create db user, create db, install git, pull from git
- name: configure instances
hosts: ec2-servers
vars:
work_dir: /vol/src/application
user: ec2-user
sudo: yes
tasks:
- name: update machine with latest packages
action: command yum -y update
- name: install xfsprogs
@translunar
translunar / extconf.rb
Created March 5, 2015 21:45
Example of C and Ruby interfacing
require "mkmf"
$srcs = [
'hypergeometric.c'
]
#if have_header("gsl/gsl_sf_exp.h", ["/usr/local/Cellar/gsl/1.15/include/"])
# have_library("gsl")
#end
You can copy & paste this ascii graphic and use it e.g. as mail signature
Font: all Fonts Reflection: no Adjustment: left Stretch: no Width: 80 Text: SymEngine
Font: 3-d
******** ******** **
**////// ** ** /**///// ***** //
/** //** ** ********** /** ******* **///** ** ******* *****
/********* //*** //**//**//**/******* //**///**/** /**/**//**///** **///**
////////** /** /** /** /**/**//// /** /**//******/** /** /**/*******