Skip to content

Instantly share code, notes, and snippets.

View acehand's full-sized avatar

Anand Chandrasekaran acehand

  • staff engineer and architect
View GitHub Profile
@acehand
acehand / controllers.application.js
Last active February 3, 2020 05:38
pizza project
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Pizza ordering'
});
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Anand Chandrasekaran",
"label": "Senior Software Engineer at CrossBorder Solutions",
"email": "anandc.1988@gmail.com",
"summary": "Keen Engineer looking to discover new challenges, and to solve them by building creative, usable solutions ",
"location": {
"city": "Brooklyn",
"countryCode": "US",
@acehand
acehand / application.controller.js
Created August 31, 2015 18:19
Bind value - stack
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
name : 'what',
actions : {
submit : function(){
alert(this.get('name'));
}
}
@acehand
acehand / gist:8d54b59ec2d0238b3059
Created June 27, 2014 15:57
To make the Host name and db name appear in the mysql prompt
export MYSQL_PS1="\u@\h [\d]> "
add this to your path and from next time you mysql prompt will include host , user and the database name
@acehand
acehand / uncouple.rb
Last active December 30, 2015 12:49
Handling weird multibyte encodings and converting them to proper utf-8
def uncoupleEncodings text
text = text.force_encoding 'ASCII-8BIT'
uncoupledText = text.
gsub("#{226.chr}#{128.chr}#{152.chr}","'").
gsub("#{226.chr}#{128.chr}#{153.chr}","'").
gsub("#{226.chr}#{128.chr}#{156.chr}",'"').
gsub("#{226.chr}#{128.chr}#{157.chr}",'"').
gsub("#{226.chr}#{128.chr}#{147.chr}","--").
gsub("#{226.chr}#{128.chr}#{148.chr}","---").
gsub("#{226.chr}#{128.chr}#{162.chr}","*").