Skip to content

Instantly share code, notes, and snippets.

Maintainers:
uncenter: cargo-shear, cargo-shear, cargo-shear, cargo-shear
@bashenk
bashenk / AndroidDeviceEnrollmentQRCreation.md
Last active May 6, 2024 11:16
Creating a QR Code for Android Device Enrollment

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@simenbrekken
simenbrekken / analytics.js
Created February 12, 2018 07:31
KISS analytics abstraction
const googleAnalytics = event => {
switch (event.type) {
default:
window.dataLayer.push(event)
}
}
const facebook = event => {
switch (event.type) {
case 'pageview':
@alexwilson
alexwilson / ga.js
Last active May 6, 2024 11:13
ga.js-style wrapper for compatibility with Google Tag Manager
(function() {
var _prefix = 'ga';
// Ensure we have a GTM Data Layer to push to.
window['dataLayer'] = window['dataLayer'] || {};
// Instead of overdeclaring _gaq, only attempt to polyfill if it doesn't already exist.
if (window['_gaq'] === 'undefined '|| typeof window['_gaq'] !== 'object') {
window['_gaq'] = {};
@EscApp2
EscApp2 / all_order_ajax.js
Last active May 6, 2024 11:12
datalayer google analitics example
BX.namespace('BX.Sale.OrderAjaxComponent');
(function() {
'use strict';
/**
* Show empty default property value to multiple properties without default values
*/
if (BX.Sale && BX.Sale.Input && BX.Sale.Input.Utils)
{
@hexylena
hexylena / cite.py
Last active May 6, 2024 11:12
Replace \cite{10.1234/some-key} with actual citation, doi2bib must be installed.
#!/usr/bin/env python
# license: cc0/public domain
import re
import sys
import subprocess
input_file = sys.argv[1]
output_file = input_file.replace('.tex', '.bib')
with open(input_file, "r") as f:
@GabrielMMelo
GabrielMMelo / sudo-termux
Created January 22, 2019 12:33
Install sudo in Termux (Android)
apt install git
git clone https://gitlab.com/st42/termux-sudo
cd termux-sudo
cat sudo > /data/data/com.termux/files/usr/bin/sudo
chmod 700 /data/data/com.termux/files/usr/bin/sudo
@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@wes-o
wes-o / + set of script for converting markdown files.md
Last active May 6, 2024 11:05
the 'less' command for new views of markdown files

Using pandoc to generate new views

How to Implement

Install pandoc(https://pandoc.org/getting-started.html)

Clone this Gist find the two files: .less-filter-to-man & md-to-pdf.sh

1 Add to your /home or ~ directory. 📘