Skip to content

Instantly share code, notes, and snippets.

View stylemistake's full-sized avatar
👾
Hacker mindset

Aleksej Komarov stylemistake

👾
Hacker mindset
View GitHub Profile
@SynCap
SynCap / remove_node_modules_recursively.ps1
Last active May 3, 2024 21:37
Remove `node_modules` folders in Windows in all subfolders recursively with PowerShell to avoid exceeding path max_length
<#
Note: Eliminate `-WhatIf` parameter to get action be actually done
Note: PS with version prior to 4.0 can't delete non-empty folders
#>
Get-ChildItem -Path "." -Include "node_modules" -Recurse -Directory | Remove-Item -Recurse -Force -WhatIf
anonymous
anonymous / PKGBUILD
Created March 8, 2017 18:01
# Maintainer: Daniel E. Shub <daniel.e.shub@gmail.com>
# Maintainer: Ido Rosen <ido@kernel.org>
## This PKGBUILD creates an Arch Linux package for the proprietary MATLAB application. A license from The MathWorks is needed in order to both build the package and to run MATLAB once the package is installed. In order to build the package the user must supply a plain text file installation key and the software. For network installations, in addition to the file installation key, a license file needs to be used for the installation. The ISO file can be downloaded from The MathWorks, generated from the official DVD, or created by using the interactive installer to download the toolboxes (installation can be made to a temporary directory and canceled once the toolboxes are downloaded). The contents of the ISO file must include: ./archives/ ./bin/ ./etc/ ./help/ ./java/ /sys ./activate.ini ./install ./installer_input.txt
## The default installation behavior is to install all licensed products whether or not they are
declare -gA runner_task_orders
runner_before() {
local task=${1}
local other_task=${2}
runner_task_orders[${task}_before]="${runner_task_orders[${task}_before]} ${other_task}"
}
runner_after() {
@stylemistake
stylemistake / textmoji.sh
Created May 24, 2015 21:18
Convert text to emoji-letters!
#!/bin/bash
## --------------------------------------------------------
## Textmoji v0.1
## Style Mistake <stylemistake@gmail.com>
## --------------------------------------------------------
declare -A charmap
eof=`echo -en '\x04'`
@stylemistake
stylemistake / weapons.cfg
Last active August 29, 2015 14:05
Advanced weapon bindings for Warsow
// weapons.cfg
// Advanced weapon bindings
// --------------------------------------------------------
// Internals
// --------------------------------------------------------
alias weap1 "use rl" // Fallback weapon
alias weap2 "wait" // Queued weapon
@stylemistake
stylemistake / juke.c
Last active August 29, 2015 14:02
C Juke
#include <stdio.h>
#include <math.h>
/*
Quick compile:
gcc juke.c -Ofast -lm -o juke && ./juke > juke.wav
*/
#define pat(x,y) (x)[bar%(y)]
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@neonichu
neonichu / ingress.py
Last active August 28, 2023 18:02
Demo of accessing the Ingress API.
#!/usr/bin/env python
import cookielib
import json
import mechanize
#####
GOOGLE_USER = 'you@gmail.com'
GOOGLE_PASS = 'your-password'
#####
/*! hsv_to_hsl.scss | MIT License | https://gist.github.com/voxpelli/1069204 */
@function max($v1, $v2) {
@return if($v1 > $v2, $v1, $v2);
}
@function min($v1, $v2) {
@return if($v1 < $v2, $v1, $v2);
}
@function hsv_to_hsl($h, $s: 0, $v: 0) {