Skip to content

Instantly share code, notes, and snippets.

View hacknug's full-sized avatar
👽

Nestor Vera hacknug

👽
View GitHub Profile
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active May 3, 2024 12:55
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@hihayk
hihayk / dynamic-line-height.css
Created July 7, 2020 17:05
Dynamically decrease line-height as the font-size grows.
:root {
--lineHeightFixedAmount: 0.25rem;
--lineHeightRelativeAmount: 1em;
--sizesIncrement: 1.4;
--fontSize-0: 1rem;
--fontSize-1: calc(var(--fontSize-0) * var(--sizesIncrement));
--fontSize-2: calc(var(--fontSize-1) * var(--sizesIncrement));
--globalLineHeight: calc(var(--lineHeightFixedAmount) + var(--lineHeightRelativeAmount));
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@tjhole
tjhole / WORDPRESS: Base64 Image to Wordpress Uploads directory
Created May 9, 2014 12:35
WORDPRESS: Base64 Image to Wordpress Uploads directory
function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,
@dsdsdsdsdsds
dsdsdsdsdsds / cursor.css
Last active November 1, 2023 11:45
CSS: Cross Browser hires/retina cursor image
.cursor {
cursor: url("cursor.png") 0 0, pointer; /* Legacy */
cursor: url("cursor.svg") 0 0, pointer; /* FF */
cursor: -webkit-image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 0 0, pointer; /* Webkit */
}
@jeffdonthemic
jeffdonthemic / index.js
Last active October 27, 2023 15:42
Lambda function to commit code to github. See blog post for more details.
var githubapi = require("github"),
async = require("async"),
AWS = require('aws-sdk'),
secrets = require('./secrets.js');
// the 'handler' that lambda calls to execute our code
exports.handler = function(event, context) {
// config the sdk with our credentials
// http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active May 4, 2023 06:40
Gradient shadow in pure CSS

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@JLarky
JLarky / example.ts
Created August 11, 2020 00:55
Expose tailwind color palette to be able to access tailwind config from javascript/browser
import { theme } from './tailwind.static';
console.log(theme.extend.colors.gray[500]);
@apavlinovic
apavlinovic / 0.57.2 GAME_MASTER
Created February 17, 2017 20:35
0.57.2 GAME_MASTER
item_templates {
template_id: "AVATAR_f_backpack_cute_0"
avatar_customization {
enabled: true
avatar_type: PLAYER_AVATAR_FEMALE
slot: BACKPACK
bundle_name: "f_backpack_cute_bundle"
asset_name: "f_backpack_cute_0"
group_name: "group_backpack"
sort_order: 77