Skip to content

Instantly share code, notes, and snippets.

View chiragchamoli's full-sized avatar
💭
I may be slow to respond.

Chirag Chamoli chiragchamoli

💭
I may be slow to respond.
View GitHub Profile
@huytd
huytd / wordle.md
Last active May 16, 2024 20:39
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

#!/usr/bin/env bash
echo "Enter you Name : (Optional, to configure Git)"
read NAME
echo "Enter your Email : (Optional, to configure Git)"
read EMAIL
echo "Give a Passphrase for SSH Key : (Optional, leave it for an empty Passphrase)"
read PASSPHRASE
@chiragchamoli
chiragchamoli / jshipster_and_and.js
Created September 9, 2018 15:48 — forked from berzniz/jshipster_and_and.js
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@ayushghosh
ayushghosh / sync.sh
Created October 14, 2014 13:07
Automate Sync
#!/bin/bash
clear
echo "Syncing Api Server from GIT"
printf "\n\n---------------------------"
printf "\n\nSitching to user forge"
sudo su forge
printf "\n\nCurrent User: "
whoami
@andrewdelprete
andrewdelprete / laracon-2014-notes.md
Last active November 19, 2018 17:19
My notes from Laracon 2014

###Jeffrey Way (1) - Bootcamp

Jeffrey went through about 12 subjects one right after the other and gave tips along the way.

  1. Mail Drivers for mail notifications.
1. With Laravel 4.2 it’s easier to use APIs like Mailgun and Mandrill for e-mail notifications. This avoids using SMTP which is really cool.
  1. File Generators for generating schema migrations.
@dpogorzelski
dpogorzelski / controllers.js
Created August 22, 2013 15:48
Simplified version of "angular-file-upload" directive. Removed support for old browsers. (original version: https://github.com/danialfarid/angular-file-upload)
"use strict";
app.controller('mainCtrl', ['$scope', '$http',
function($scope, $http) {
$scope.onFileSelect = function(files) {
console.log(files);
for (var i = 0; i < files.length; i++) {
var file = files[i];
$http.uploadFile({
url: 'api/file',
@jdkanani
jdkanani / notepad.html
Last active April 6, 2024 17:09 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@thomaspark
thomaspark / subnav.css
Last active June 6, 2023 10:19
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@christianhanvey
christianhanvey / links
Created July 24, 2012 00:17
some useful reference links - in markdown
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags