Skip to content

Instantly share code, notes, and snippets.

View piotrkubisa's full-sized avatar
🐱
Set status

Piotr Kubisa piotrkubisa

🐱
Set status
View GitHub Profile
@piotrkubisa
piotrkubisa / AddManifestToExe.cmd
Last active August 29, 2015 13:57
Some scripts to get rid of freaky dynamic color (aka unicorn's rainbow vomit) tiles in Windows 8.1.
forfiles /m "*.exe" /C "cmd /c xcopy C:\PATH_TO\EXE.visualelementsmanifest.xml .\@fname.visualelementsmanifest.xml"
@piotrkubisa
piotrkubisa / bfp4fGameEventStats.json
Created April 13, 2014 14:52
Battlefield Play4Free "GameEventStats" revealed.
{"GameEventStats": {
"12": "Roadkills",
"16": "Headshots",
"24": "Double kills",
"25": "Triple kills",
"26": "Multi kills",
"27": "Defensive kills",
"28": "Offensive kills",
"29": "Flags captured",
"30": "Driver kill assists",
@piotrkubisa
piotrkubisa / MoqupsSidebarToggle.user.js
Last active August 29, 2015 14:03
UserScript (TaperMonkey). Toggle sidebar with stencils on moqups.com to make display wider!
// ==UserScript==
// @name MoqupsSidebarToggle
// @namespace https://gist.github.com/piqus/8d026e5176a550d7ff4c
// @version 0.1
// @description Show/Hide left sidebar with stencils on moqups.com to make display wider!
// @match https://moqups.com/*
// @copyright 2014+, Piotr Kubisa
// ==/UserScript==
var isSidebarHidden = false;
@piotrkubisa
piotrkubisa / DisableOneDrive.bat
Created August 15, 2015 17:56
Disable OneDrive on WIndows10
REM https://www.reddit.com/r/Windows10/comments/3f38ed/guide_how_to_disable_data_logging_in_w10
@echo off
cls
set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
echo Closing OneDrive process.
echo.
taskkill /f /im OneDrive.exe > NUL 2>&1
@piotrkubisa
piotrkubisa / addhost.sh
Created September 10, 2015 17:08
Add quickly record to /etc/hosts
#!/bin/bash
# http://matthewhutchinson.net/2011/1/10/configuring-subdomains-in-development-with-lvhme
SUBDOMAIN=$1
TLD=$2
if [ $# -lt 1 ]
then
echo "which subdomain?"
read SUBDOMAIN
if [ -n "$SUBDOMAIN" ]
@piotrkubisa
piotrkubisa / page-up-down-home-end-osx.sh
Created October 24, 2015 18:04
Set windows-like page-up, page-down, home, end key bindings globally on OS X like a sir (using just one script).
#!/usr/bin/env
cd "$HOME/Library/"
mkdir -p "KeyBindings"
cd KeyBindings
file="DefaultKeyBinding.dict"
if [ -e $file ]; then
echo "Error: File already exists! In aware of conflicts please review insertion manually."
import Html exposing (Html, Attribute, input, strong, ul, li, em, div, text, button)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (onInput, onClick)
main =
Html.beginnerProgram { model = model, view = view, update = update }
-- MODEL
@piotrkubisa
piotrkubisa / Main.elm
Last active July 25, 2016 18:27
Recursive module in Elm with update
module Categories exposing (Model, Msg, init, update, view)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onInput, onClick)
type alias Model =
{ entry : String
, path : Path
@piotrkubisa
piotrkubisa / rocketeerv2.bash
Last active August 4, 2016 06:51
Rocketeer v2 for Ubuntu Xenial Xerus 16.04
# set default locales for system
sudo export LANGUAGE=en_US.UTF-8
sudo export LANG=en_US.UTF-8
sudo export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
# utils
sudo apt-get update
sudo apt-get install -y zsh git curl tree aptitude
@piotrkubisa
piotrkubisa / permissions.bash
Created September 22, 2016 21:25 — forked from pjdietz/permissions.bash
Set file and directory permissions with find, xargs, chmod
# Set all directories to 755, all files to 644.
find -type d -print0 | xargs -0 chmod 755
find -type f -print0 | xargs -0 chmod 644