Skip to content

Instantly share code, notes, and snippets.

View danechitoaie's full-sized avatar
🏠
Working from home

Daniel Anechitoaie danechitoaie

🏠
Working from home
View GitHub Profile
@aleclarson
aleclarson / rollup-typescript.md
Last active April 7, 2024 14:13
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@sholsinger
sholsinger / sfcc-b2c-docs-as-search-engine.md
Last active July 31, 2023 03:13
SFCC B2C Documentation as a Search Engine in your Browser

How to easily look up things in the SFCC B2C Docs from your URL bar

This guide is intended for use with Chrome, but this feature exists in several browsers. It will walk you through adding a cusom SFCC B2C search engine shortcut to your Chrome profile.

Updated 2023-07-30

Setup

Step 1 In Chrome, go to Settings > Search engine > Manage search engines (Or just navigate to: chrome://settings/searchEngines)

@EvilBeaver
EvilBeaver / cleanupJenkinsWorkspaces.groovy
Last active October 18, 2023 10:15 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@michalochman
michalochman / gulpfile.js
Last active May 19, 2021 22:11
gulp.js: babelify + browserify + sourcemaps
/* jshint strict: false */
/* globals require, console */
var gulp = require('gulp');
var exit = require('gulp-exit');
var browserify = require('browserify');
var watchify = require('watchify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@danechitoaie
danechitoaie / models.py
Created November 14, 2015 12:29 — forked from arecker/models.py
models
from uuid import uuid4
from django.db import models
from django.core.validators import MinValueValidator
class Rate(models.Model):
id = models.UUIDField(primary_key=True,
editable=False,
default=uuid4,
unique=True)
@cuibonobo
cuibonobo / centos_python_install.md
Last active April 30, 2024 13:13
Install Python 2.7.15 on CentOS 6

These instructions were mostly taken from here, though I've modified them to install Python 2.7.15 and the latest setuptools package.

# Install dependencies
yum groupinstall -y 'development tools'
yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget

# Download the Python source and unpack it
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar -xvzf Python-2.7.15.tgz
@karnauskas
karnauskas / jenkins.service
Created October 13, 2014 21:45
Jenkins service unit file for Systemd
[Unit]
Description=Jenkins
After=network.target
Requires=network.target
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/jenkins
ExecStart=/usr/bin/java ${JENKINS_JAVA_OPTIONS} -jar /usr/lib/jenkins/jenkins.war --httpPort=${JENKINS_PORT} --httpListenAddress=${JENKINS_LISTEN_ADDRESS} ${JENKINS_ARGS}
Restart=always
@sseffa
sseffa / xss-owasp-cheatsheet
Created April 18, 2014 08:16
xss-owasp-cheatsheet
#
# https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
# based on the RSnake original http://ha.ckers.org/xss.html
# Retrieved on 2013-11-20
# Much of this wildly obsolete
#
# XSS Locator 2
'';!--"<XSS>=&{()}