Skip to content

Instantly share code, notes, and snippets.

View mischah's full-sized avatar
:octocat:
afk // brb

Michael Kühnel mischah

:octocat:
afk // brb
View GitHub Profile
@Qix-
Qix- / sha256.sh
Last active July 10, 2023 10:00
SHA256 in (mostly) pure Bash script
#!/usr/bin/env bash
# Released into the Public Domain.
#
# Original implementation in C by Brad Conte (brad@bradconte.com) <https://github.com/B-Con/crypto-algorithms>
# Ported to Bash (lol) by Josh Junon (josh@junon.me) <https://github.com/qix->
#
# Yes, it's absolutely as slow as it looks.
#
# The only external dependency it has is on a utility called `od`,
@nicolaisueper
nicolaisueper / index.js
Last active February 8, 2024 14:15
Download all GFDA-Wallpaper in 5K into current folder
const linkList = ["https://cdn.shopify.com/s/files/1/0201/8578/files/242-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-black_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-bob_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-black_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-bob_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-b
@moay
moay / imapsync.md
Last active June 29, 2023 05:51 — forked from dsoares/imapsync.md
Install and use imapsync in Mac OS X

Install and use imapsync in Mac OS X

brew install imapsync

Run (without ssl)

imapsync --host1 imap.from.server --user1 foo --password1 secret1 --host2 imap.dest.server --user2 bar --password2 secret2

Run (with ssl)

@nicolaisueper
nicolaisueper / howto.md
Last active June 9, 2017 10:48
Centralized Error Handling in Angular

Global error handling in Angular 2 / 4

Create ErrorHandler

// file: my-error-handler.ts

import { ErrorHandler, Injector, Injectable } from '@angular/core';
import { Response } from '@angular/http';
import { Router } from '@angular/router';
@lfuelling
lfuelling / wifi-aliases.sh
Created February 6, 2017 13:17
Bash aliases for wifi and darkmode
#!/bin/bash
# Wifi
alias wstat="networksetup -getairportpower en0"
alias won="networksetup -setairportpower en0 on"
alias woff="networksetup -setairportpower en0 off"
# Darkmode
alias darkon='osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to true"'
alias darkoff='osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to false"'
@AshikNesin
AshikNesin / react-file-upload.js
Created February 2, 2017 06:46
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@facundofarias
facundofarias / mutt_on_osx.sh
Created January 3, 2017 10:55
Installing and configuring Mutt on OSX
# Install mutt using brew
$ brew install mutt
# Configure mutt
$ vim ~/.muttrc
# Put the following on the mutt config file (.muttrc)
set imap_user = “YOUR_USERNAME@GMAIL_OR_YOUR_DOMAIN.com”
set imap_pass = “YOUR_PASSWORD”
set smtp_url = “smtp://YOUR_USERNAME@GMAIL_OR_YOUR_DOMAIN@smtp.gmail.com:587/”

How to migrate an existing repo to a lfs repo.

The tool can be found here.

https://github.com/bozaro/git-lfs-migrate/releases

I recommend to migrate an existing repo to a new repo with lfs support activated and delte the old one afterwards.

Requirements

@mischah
mischah / .gitattributes
Last active June 29, 2017 08:17
.gitattributes file containing binary file extensions based on https://github.com/sindresorhus/binary-extensions
*.3ds filter=lfs diff=lfs merge=lfs -text
*.3g2 filter=lfs diff=lfs merge=lfs -text
*.3gp filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
*.a filter=lfs diff=lfs merge=lfs -text
*.aac filter=lfs diff=lfs merge=lfs -text
*.adp filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.aiff filter=lfs diff=lfs merge=lfs -text
@brennanMKE
brennanMKE / README.md
Created October 4, 2016 16:10
React Native on macOS Sierra

React Native Trouble

Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.

The following command shows the current limit.

launchctl limit maxfiles