Skip to content

Instantly share code, notes, and snippets.

View thomasgroch's full-sized avatar

Thomas Letsch Groch thomasgroch

View GitHub Profile
@thomasgroch
thomasgroch / _ide_helper.php
Created August 8, 2016 02:24 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.1.40 (LTS) on 2016-07-18.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@thomasgroch
thomasgroch / vanilla-js-cheatsheet.md
Created July 5, 2017 17:17 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@thomasgroch
thomasgroch / mixins.styl
Created September 5, 2017 21:01 — forked from russweas/mixins.styl
Stylus BEM mixins
// Mixins.styl
has($name)
/&__{$name}
{block}
variant($name)
/&--{$name}
{block}
@thomasgroch
thomasgroch / bem.less
Created September 6, 2017 13:40 — forked from vivid-web/bem.less
BEM Helper (SCSS, SASS, LESS, Stylus)
// Mixins
.has(@element; @content) {
&__@{element} {
@content();
}
}
.variant(@modifier; @content) {
&--@{modifier} {
@content();
@thomasgroch
thomasgroch / Storj_Farmer_Contracts.js
Created October 21, 2017 08:18 — forked from littleskunk/Storj_Farmer_Contracts.js
Storj_Farmer_Contracts.js
// How to run it
// Requires nodejs LTS, git, python2
// Open command line and move to the folder where this script is stored
// Edit the script and modify storage location (line 87)
// Check the startDate and EndDate and modify it if you need another timeframe (line 102 - 103)
// Stop the farmer
// Execute "npm install storj-lib"
// Execute "node Storj_Farmer_Contracts.js"
// Start the farmer
@thomasgroch
thomasgroch / gist:2ffbaeebd1d1f15085898fed67e39153
Created September 2, 2018 02:04 — forked from namxam/gist:11173219
RSA with PKCS encryption and Mavericks support
# Create a rsa key with 4096 bit encryption. This is far more secure than 2048.
# The email is just a plain comment. Make sure you enter a passphrase!
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# The basic passphrase security is rather bad and easy to break. Read the following article why:
# http://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html
mv id_rsa id_rsa.old
openssl pkcs8 -topk8 -v2 des3 -in ~/.ssh/id_rsa.old -out ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
@thomasgroch
thomasgroch / kalizero.sh
Created November 17, 2018 12:31 — forked from jgamblin/kalizero.sh
Run Kali (kinda) on a Pizero.
#!/bin/bash
## Update & Install Mate Desktop ##
apt-get update && sudo apt-get dist-upgrade -y
apt-get install --no-install-recommends git mate-core mate-desktop -y
apt-get install mate-core mate-desktop-environment mate-notification-daemon xrdp iceweasel -y
echo mate-session> ~/.xsession
cp /home/pi/.xsession /etc/skel
## Install Katoolin ##
@thomasgroch
thomasgroch / webpack4upgrade.md
Created January 22, 2019 23:15 — forked from gricard/webpack4upgrade.md
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@thomasgroch
thomasgroch / checkwifi.sh
Last active January 28, 2019 17:32 — forked from yamao2253/reconnect.sh
Raspberry Pi WiFi reconnection script
#!/bin/bash
while true
do
# ping -c 1 192.168.0.1
# #test $? -eq 1 && sudo /etc/ifplugd/ifplugd.action wlan0 up
# test $? -ne 0 && sudo /etc/ifplugd/action.d/action_wpa wlan0 up
ping -c2 192.168.0.1 > /dev/null
if [ $? != 0 ]
#!/bin/bash
#### INSTALL ####
#1 - Defina as 3 variáveis abaixo
# Gitlab api endpoint
export GITLAB_API_ENDPOINT="https://gitlab.com/api/v4"
# Get it in https://gitlab.com/profile/account
export GITLAB_API_PRIVATE_TOKEN=""
# Get it from https://gitlab.com/api/v3/projects/?private_token=YOUR_PROVATE_TOKEN
export GITLAB_PROJECT_ID=""