Skip to content

Instantly share code, notes, and snippets.

View pmaingi's full-sized avatar
Focusing

pmaingi pmaingi

Focusing
  • Gothenburg, Sweden
View GitHub Profile
@pmaingi
pmaingi / fix_exfat_drive.md
Created February 3, 2023 08:29 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
@pmaingi
pmaingi / setup.sh
Created July 7, 2020 15:16 — forked from chris-sev/setup.sh
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
#!/bin/bash
set -euo pipefail

Sublime text 3 (Build 3114) license key, these all tested available on 2016/05/13

—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@pmaingi
pmaingi / ci-encryption-key-generator.php
Created May 19, 2016 12:50 — forked from jeffreybarke/ci-encryption-key-generator.php
This is the code I use (minus Google Analytics) for the CodeIgniter encryption key generator located at http://jeffreybarke.net/tools/codeigniter-encryption-key-generator/
<?php
/**
* Generate an encryption key for CodeIgniter.
* http://codeigniter.com/user_guide/libraries/encryption.html
*/
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP
function generate_token ($len = 32)
{
@pmaingi
pmaingi / Sublime Text 3 Build 3103 License Key - CRACK
Created May 19, 2016 11:19
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@pmaingi
pmaingi / List.md
Created October 7, 2015 07:10 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@pmaingi
pmaingi / download_paper.py
Last active September 18, 2015 07:43 — forked from ninenine/download_paper.py
Download Kenyan Daily Nation and Business Daily
#!/usr/bin/env python
import urllib2
from datetime import date
def main():
today = date.today()
suffix = getDateSuffix(today)
fdate = "%s %s%s %s" % (today.strftime('%b'),today.strftime('%d').lstrip('0'),suffix,today.strftime('%Y'))
print("Downloading Daily Nation...")
@pmaingi
pmaingi / Sublime Text License Key
Last active September 18, 2015 07:40
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version
Go to menu Help > Enter License.
----- BEGIN LICENSE -----
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 9.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20150705
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=9.0.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION