Skip to content

Instantly share code, notes, and snippets.

View mkg20001's full-sized avatar
🌟
rinse and repeat, rise and shine

Maciej Krüger mkg20001

🌟
rinse and repeat, rise and shine
View GitHub Profile
@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active November 9, 2024 08:57
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@shesek
shesek / bitcoinjs-lib-nodejs.sh
Last active July 2, 2017 16:53
Package bitcoinjs-lib as a nodejs module (VERY hacky, but good enough for now)
#!/bin/bash
# Package bitcoinjs-lib as a nodejs module
# Install bitcoinjs first (`npm install bitcoinjs-lib`),
# than run this in your app's directory.
TARGET=lib/bitcoinjs-lib.js
# Wrap all of bitcoinjs-lib and its dependencies in an IIFE
# and export the Bitcoin, Crypto and BigInteger objects.
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@komasaru
komasaru / test_bash_cursor_2.sh
Last active May 2, 2017 12:25
Bash script to control cursor position.(Ex.2)
#!/bin/bash
# Clear the screen
tput clear
# Write a frame
echo
echo " +---------------------+"
echo " | |"
echo " +---------------------+"
@eduardocardoso
eduardocardoso / gist:82a629882ddb02ab3677
Last active April 3, 2023 08:23
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@fritx
fritx / app-drag.js
Last active May 25, 2017 11:00
nwjs/electron window dragging implementation (replacement of -webkit-app-region: drag/no-drag)
var remote = require('remote')
var $ = require('./lib/jquery')
var win = remote.getCurrentWindow()
var isDragging = false
var winPos
var dX, dY // screen - win
$(document).on('mousedown', '.app-drag', function(e) {
e = e.originalEvent || e
@deanhume
deanhume / client-hints-service-worker.js
Last active September 10, 2017 11:03
Service Worker & HTTP Client Hints
"use strict";
// Listen to fetch events
self.addEventListener('fetch', function(event) {
// Check if the image is a jpeg
if (/\.jpg$|.png$/.test(event.request.url)) {
// Inspect the accept header for WebP support
var supportsWebp = false;
import urllib2, re, json, os, time, sys, HTMLParser
html_parser = HTMLParser.HTMLParser()
auth_address = "1KbV1e1u6P6AsY8XNBydgtbtN8iSB5WMyG"
auth_privatekey = "xxxx"
site = "1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT"
zeronet_dir = ".."
os.chdir(zeronet_dir)
  • git checkout master
  • git pull
  • git checkout branch
  • git merge master