Skip to content

Instantly share code, notes, and snippets.

View biwin's full-sized avatar
🎯
Focusing

Biwin Joseph biwin

🎯
Focusing
View GitHub Profile
@biwin
biwin / directory-list-writer.py
Created September 14, 2014 18:16
A simple python3 program to write the list of files and folders in a given directory to a tesxt file.
__author__ = 'payload'
from os import listdir
# this program copies the file/folder names in a given directory to a text file.
# start the program
proceed = True
while proceed is True:
@biwin
biwin / Unix Notes.md
Created September 18, 2014 06:03
Things I learnt from stackoverflow and others over time. .!! works well with Ubuntu 14.04

File Operations

Remove file from trash as super user:

sudo rm -fr ~/.local/share/Trash/files/*

@biwin
biwin / Install Intellij IDEA on Ubuntu.md
Last active August 29, 2015 14:06
Simple easy to follow instructions to install Intellij Idea on ubuntu.

##How to install Intellij Idea on Ubuntu.


make sure you do either one way A or B in the steps.

###Step 1: Make sure you have installed jdk.

Type in java -version in the terminal.

The terminal must output something this way.

@biwin
biwin / taking_a_vacation.py
Last active August 29, 2015 14:11
Taking a Vacation - codeacademy
def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
@biwin
biwin / gulpfile-wildcard-reload.js
Created November 18, 2015 15:41
gulp-livereload reload on any filechange
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('default', function() {
livereload.listen();
gulp.watch(['**']).on('change', livereload.changed);
});
@biwin
biwin / gulpfile-reload-compile-sass.js
Created November 18, 2015 15:43
gulpfile to reload and compile sass files
var gulp = require('gulp');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload');
gulp.task('sass', function () {
gulp.src('scss/*.scss')
.pipe(sass({outputStyle: 'compressed'}))
.pipe(gulp.dest('css'))
.pipe(livereload());
});
@biwin
biwin / gulpfile-server-sass-reload.js
Created November 18, 2015 15:45
starts server on port 8000, compiles sass and reloads on filechanges.
var gulp = require('gulp'),
sass = require('gulp-sass'),
connect = require('gulp-connect');
connect.server({port: 8000, livereload: true});
gulp.task('sass', function () {
gulp.src('scss/*.scss')
.pipe(sass({outputStyle: 'compressed'}))
Install stylebot on chrome
https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha/related?hl=en
add this styles with the url http://sassmeister.com/
.site_header {
border-bottom: 1px solid #032F2D;
background: #2F768E;
@biwin
biwin / _rem.sass
Created November 23, 2015 20:49
.sass version of rem converter @https://github.com/pierreburel/sass-rem/blob/master/_rem.scss
// .sass version of rem converter @https://github.com/pierreburel/sass-rem/blob/master/_rem.scss
$rem-baseline: 16px !default
$rem-fallback: true !default
$rem-px-only: false !default
// list-separator polyfill by Hugo Giraudel (https://sass-compatibility.github.io/#list_separator_function)
@function rem-separator($list)
@if function-exists("list-separator") == true
@return list-separator($list)
@biwin
biwin / bsnl-popup.js
Created April 26, 2016 03:42
BSNL redirection
http://117.202.20.130/dyn/bg/BSNL-FreeRoaming/index.js?policy=26&policyname=BSNL-FreeRoaming&time=1461310826&webServer=http://117.202.20.130&url=http%3A%2F%2Fwww.filmsite.org%2Fjs%2Ffilm-site.js
(function() {
var buttonPrefix = "+";
var buttonTag = "button";
var categoryTag = "category";
var commandTag = "cmd";
var confirmTag = "confirm";
var displayTag = "display";
var errorTag = "error";