Skip to content

Instantly share code, notes, and snippets.

Peter AnderssonPeter

  • Sweden
Block or report user

Report or block AnderssonPeter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View You shall not debug
const fadeText = function () {
function getRandomColor () {
return '#'+Math.floor(Math.random()*16777215).toString(16);
}
const words = 'You shall not debug I am a servant of the JavaScript wielder of the flame of V8. You cannot Debug. The dark fire will not avail you flame of Google. Go back to the IE! You cannot pass.'.split(' ');
var div = document.createElement('div');
div.setAttribute('style', 'position: fixed; right: 10px; bottom: 10px;z-index: 100000; font-size: 100px; font-weight: bold;');
document.body.appendChild(div);
function fade(initial, step, delay, callback) {
div.style.display = 'block';
View Rickroll
const addVideo = function () {
var video = ['HP362ccZBmY', 'oHg5SJYRHA0'].sort(() => Math.random() - 0.5).pop();
var div = document.createElement('div');
div.innerHTML = '<iframe width="560" height="315" src="https://www.youtube.com/embed/' + video + '?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
div.setAttribute('style', 'position: fixed; right: 10px; bottom: 10px;z-index: 100000');
document.body.appendChild(div);
}
const fadeText = function () {
function getRandomColor () {
@AnderssonPeter
AnderssonPeter / create bindings
Created Oct 31, 2018
Map git from windows to msys2
View create bindings
@ECHO 'Binding .gitconfig to current windows .gitconfig'
mklink C:\msys64\home\%username%\.gitconfig C:\Users\%username%\.gitconfig
@ECHO 'Binding .ssh to current windows .ssh'
mklink /D C:\msys64\home\%username%\.ssh C:\Users\%username%\.ssh
View -Javascript debugging tools-
Contains the following javascript tools:
Break when property changes
Break when property changes (works on arrays)
Save object as json to disk
Dumpt cookies to console
Flatten javascript array
Flatten recusrive object
Get recusrive parent
Group array by property
Sort orbject
@AnderssonPeter
AnderssonPeter / configuration.yaml
Last active Jun 1, 2017
custom sensor component to work against trafikverket in home assistant
View configuration.yaml
#example configuration
sensor:
- platform: trafikverket
api_key: !secret trafikverket_api_key
trains:
- name: "Train to work"
from: Sölvesborg
to: Kristianstad C
time: "07:28"
- name: "Train from work early"
View ExportPerfomanceCountersHelpers.ps1
Add-Type -TypeDefinition @"
public enum AggregationType
{
Min,
Max,
Sum,
Avg
}
"@
View webpack.config.vendor.js
var isDevBuild = process.argv.indexOf('--env.prod') < 0;
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var extractCSS = new ExtractTextPlugin('vendor.css');
module.exports = {
resolve: {
extensions: [ '', '.js' ]
},
View gist:6dcd9b343549bbf13aef
cinst fiddler4
cinst dotpeek
cinst Sysinternals
cinst beyondcompare
cinst ilspy
cinst 7zip.install
cinst paint.net
cinst Inkscape
cinst filezilla
cinst tortoisesvn
You can’t perform that action at this time.