Skip to content

Instantly share code, notes, and snippets.

View warifp's full-sized avatar
:shipit:
Life is a nightmare with code, raised on ethics

Wahyu Purnomo warifp

:shipit:
Life is a nightmare with code, raised on ethics
View GitHub Profile

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email [email protected] 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

@warifp
warifp / app.py
Created June 9, 2021 09:01 — forked from mneedham/app.py
Mapping Strava runs using Leaflet and Open Street Map
from flask import Flask
from flask import render_template
import csv
import json
app = Flask(__name__)
@app.route('/')
def my_runs():
runs = []
@warifp
warifp / README.md
Created March 19, 2021 08:56 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@warifp
warifp / KeyGenerateCommand.php
Created January 7, 2021 09:22 — forked from krisanalfa/KeyGenerateCommand.php
Lumen Key Generator Commands
<?php
namespace App\Console\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class KeyGenerateCommand extends Command
{
@warifp
warifp / imei_generator.js
Created December 28, 2020 08:45
IMEI Generator
//
// Online Random IMEI Number Generator
//
// By: LazyZhu (http://lazyzhu.com/)
//
// Modified from: http://bradconte.com/cc_generator
//
function imei_gen() {
var pos;
@warifp
warifp / imei_generator.js
Created December 28, 2020 08:45
IMEI Generator
//
// Online Random IMEI Number Generator
//
// By: LazyZhu (http://lazyzhu.com/)
//
// Modified from: http://bradconte.com/cc_generator
//
function imei_gen() {
var pos;
@warifp
warifp / imei_generator.js
Created December 28, 2020 08:45
IMEI Generator
//
// Online Random IMEI Number Generator
//
// By: LazyZhu (http://lazyzhu.com/)
//
// Modified from: http://bradconte.com/cc_generator
//
function imei_gen() {
var pos;
@warifp
warifp / README.md
Created August 12, 2020 23:16 — forked from mul14/README.md
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model 
{
@warifp
warifp / publickey-git-error.markdown
Created August 8, 2020 14:17 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@warifp
warifp / Response.php
Created June 14, 2020 10:01 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;