Skip to content

Instantly share code, notes, and snippets.

View AshV's full-sized avatar
🌴
Coding @ Maldives Beaches

Ashish Vishwakarma AshV

🌴
Coding @ Maldives Beaches
View GitHub Profile
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@elecnix
elecnix / convert-to-hd.sh
Created April 6, 2011 22:38
Convert video to 720p HD
#!/bin/bash
#
# Scales down (or up) a video to 720p, re-encoding it as MPEG4.
#
# Useful as a Nautilus Script in Gnome.
#
# https://help.ubuntu.com/community/AndroidVideoEncoding#Expert mode: Using ffmpeg (command line)
ffmpeg -strict experimental -i "$1" -s 1280x720 -vcodec mpeg4 -b 3000k -acodec aac -ac 1 -ar 16000 -r 13 -ab 64000 "$1.shrinked.mp4"
@alisonailea
alisonailea / Client-side full-text search in CSS
Created September 11, 2013 18:18
Client-side full-text search in CSS Using data- attributes for indexation, and a dynamic stylesheet with a CSS3 selector for search, it is straightforward to implement a client-side full-text search in CSS rather than JavaScript.
Reference:
Created by Redo The Web
http://redotheweb.com/2013/05/15/client-side-full-text-search-in-css.html
@revolunet
revolunet / lzw_encoder.js
Created February 25, 2011 14:55
LZW javascript compress/decompress
// LZW-compress a string
function lzw_encode(s) {
var dict = {};
var data = (s + "").split("");
var out = [];
var currChar;
var phrase = data[0];
var code = 256;
for (var i=1; i<data.length; i++) {
currChar=data[i];

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email your@email.com will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default in main.go, so you can run gogitlocalstats without parameters.

Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.

License: CC BY-SA 4.0

@devigned
devigned / powershell-and-versions.ps1
Created October 5, 2015 06:52
PowerShell and System.Version Examples.
# Not all of these things are the like the others...
# The last version of this usage will leave you in sadness if you don't catch it.
New-Object System.Version("0.1.1")
# Major Minor Build Revision
# ----- ----- ----- --------
# 0 1 1 -1
New-Object System.Version(0, 1, 1)
# Major Minor Build Revision
@clarketm
clarketm / google-dorks
Created January 30, 2017 10:01 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@drizzentic
drizzentic / index.php
Created July 19, 2016 14:20
Sample USSD Application
<!-- MIT License
Copyright (c) 2016 Derrick Rono
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@kimerran
kimerran / Succinctly_dl.cs
Created July 7, 2014 08:34
download FREE ebooks
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using c = System.Console;
using System.IO;
using System.Net;
namespace StretchUtak
{
class Program
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Collections.Generic;
public class SSEvent {
public string Name { get; set; }
public string Data { get; set; }