Skip to content

Instantly share code, notes, and snippets.

:octocat:
afk // brb

Michael Kühnel mischah

:octocat:
afk // brb
View GitHub Profile
@Qix-
Qix- / sha256.sh
Last active Jun 14, 2019
SHA256 in (mostly) pure Bash script
View sha256.sh
#!/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 Aug 13, 2019
Download all GFDA-Wallpaper in 5K into current folder
View index.js
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
@nicolaisueper
nicolaisueper / howto.md
Last active Jun 9, 2017
Centralized Error Handling in Angular
View howto.md

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 Feb 6, 2017
Bash aliases for wifi and darkmode
View wifi-aliases.sh
#!/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"'
View react-file-upload.js
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 Jan 3, 2017
Installing and configuring Mutt on OSX
View mutt_on_osx.sh
# 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/”
View lfs-migration.md

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 Jun 29, 2017
.gitattributes file containing binary file extensions based on https://github.com/sindresorhus/binary-extensions
View .gitattributes
*.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 Oct 4, 2016
React Native on macOS Sierra
View README.md

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
@toddmotto
toddmotto / *.md
Last active Jul 12, 2020
Component versus Directive in AngularJS
View *.md

Component versus Directive in AngularJS

.component()

Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture
You can’t perform that action at this time.