Skip to content

Instantly share code, notes, and snippets.

View enix-app's full-sized avatar
🎯
Focusing

E enix-app

🎯
Focusing
  • EnixApp
View GitHub Profile
@syntaxhacker
syntaxhacker / Flutterinstallwithoutandroidstudio.md
Last active April 30, 2024 02:49
setup flutter without android studio

Flutter install without android studio

set flutter

Download flutter

tar xvf flutter_linux_1.17.5-stable.tar.xz

@lukeeey
lukeeey / index.html
Created August 6, 2018 23:41
SVG Effect: Outer Glow
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" preserveAspectRatio="xMinYMin meet">
<defs>
<filter id="sofGlow" height="300%" width="300%" x="-75%" y="-75%">
<!-- Thicken out the original shape -->
<feMorphology operator="dilate" radius="4" in="SourceAlpha" result="thicken" />
<!-- Use a gaussian blur to create the soft blurriness of the glow -->
<feGaussianBlur in="thicken" stdDeviation="10" result="blurred" />
@markheckmann
markheckmann / remove_password_excel.R
Last active February 4, 2022 05:27
Remove sheet's password protection in Excel
# remove sheet protection in Excel
# Sample file: https://www.dropbox.com/s/4ul0kowrscyr8cz/excel_protected.xlsx?dl=0
library(stringr)
library(zip)
# file with protected sheets
file <- "data/excel_protected.xlsx"
# file name and path after removing protection
@stephanbogner
stephanbogner / index.js
Created March 7, 2018 22:17
Create tree structure from paths array
var paths = [
["Account"],
["Account", "Payment Methods"],
["Account", "Payment Methods", "Credit Card"],
["Account", "Payment Methods", "Paypal"],
["Account", "Emails"],
["Account", "Emails", "Main Email"],
["Account", "Emails", "Backup Email"],
["Account", "Devices"],
["Account", "Devices", "Google Pixel"],
@deanhume
deanhume / clear-cache.js
Created September 20, 2017 08:22
Clear Service Worker Cache
if ('serviceWorker' in navigator) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
}
@himalay
himalay / console.log.js
Last active November 12, 2023 09:50
Colorful console.log in js
// browser
console.log('%c Fucking hell! ', 'background: #222; font-size: 42px; color: #ff0000');
// nodejs
console.log('\x1b[36m%s\x1b[0m', info); //cyan
console.log('\x1b[33m%s\x1b[0m: ', path); //yellow
//Here is reference of colors and other characters:
Reset = "\x1b[0m"
Bright = "\x1b[1m"
@ORESoftware
ORESoftware / resize-base64.js
Last active October 28, 2023 19:27
resizing an image on the front-end before sending to a server
// Using this code, we can retrieve an image from a user's filesystem, resize the image, and then upload the image
// to a server using AJAX. Because we use base64 encoding, we can just include the image data as just another string value
// in a JSON payload.
// So we can use AJAX to send the file to a server, which is convenient.
// We have one line of relevant html
// get file in the first place => <input type="file" custom-on-change="onAcqImageFileChange" class="form-control">
@james2doyle
james2doyle / jquery.getStylesheet.js
Created February 3, 2016 21:05
An implementation of $.getScript but for stylesheets. Call it $.getStylesheet
(function($) {
$.getStylesheet = function (href) {
var $d = $.Deferred();
var $link = $('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: href
}).appendTo('head');
$d.resolve($link);
return $d.promise();
@spolischook
spolischook / kotoblog_parse-http-accept-language-header.php
Last active November 15, 2023 04:35
Get prefer language by parsing HTTP_ACCEPT_LANGUAGE header
<?php
$prefLocales = array_reduce(
explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']),
function ($res, $el) {
list($l, $q) = array_merge(explode(';q=', $el), [1]);
$res[$l] = (float) $q;
return $res;
}, []);
arsort($prefLocales);
@jonschlinkert
jonschlinkert / examples.md
Last active March 4, 2024 04:40
Three files: examples.md, yaml-cheatsheet.md and yaml-cheatsheet.yml

adapted from this blog

# YAML
name: Jon
# YAML
object: