Skip to content

Instantly share code, notes, and snippets.

View nedzen's full-sized avatar
:octocat:
looking for work

Marius Nedelcu nedzen

:octocat:
looking for work
  • Bucharest
View GitHub Profile
@tobimori
tobimori / _app.jsx
Created February 15, 2022 13:50
Ackee Analytics with Next.js
import { useEffect } from 'react'
import Router from 'next/router'
import * as ackeeTracker from 'ackee-tracker'
// global styles (css reset, fonts)
import 'assets/styles/global.css'
const PersonalApp = ({ Component, pageProps, router }) => {
useEffect(() => {
if (typeof window !== 'undefined') {
@akella
akella / setup.md
Last active May 1, 2024 05:33
My Setup
@renatodeleao
renatodeleao / figma-api-get-svg-via-images-endpoint.js
Last active September 14, 2023 17:04
Figma API — Get an svg node (via /images endpoint)
const ACCESS_TOKEN = "token";
const FILE_ID = "fileId";
const NODE_ID = "Check the url for something like => 3%3A2";
const container = document.getElementById("figma-container")
function apiRequest(url) {
return fetch(url, {
method: 'GET',
headers: { "x-figma-token": ACCESS_TOKEN }
}).then(function(response) {
@pcmaffey
pcmaffey / Code.gs
Last active September 19, 2023 15:56
Roll your own analytics - Google Apps Script for writing custom analytics to Google Sheets
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
// NOTE: Uses es5 javascript
// handle method: get
function doGet(e){
return handleResponse(e);
}
// handles method: post
function doPost(e){
@ultragtx
ultragtx / RSI_and_StochRSI.py
Created November 17, 2018 18:30 — forked from so1tsuda/RSI_and_StochRSI.py
Functions that calculate RSI and StochRSI which give the same value as Trading View. I wrote these functions as RSI and StochRSI functions from TA-Lib give different values as TV.
# calculating RSI (gives the same values as TradingView)
# https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas
def RSI(series, period=14):
delta = series.diff().dropna()
ups = delta * 0
downs = ups.copy()
ups[delta > 0] = delta[delta > 0]
downs[delta < 0] = -delta[delta < 0]
ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains
@firatkucuk
firatkucuk / delete-slack-messages.js
Last active May 1, 2024 04:17
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@russianryebread
russianryebread / index.html
Last active May 13, 2019 22:01
Bare-Bones HTML 5 Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<!-- page content -->
</body>
</html>
@angusfretwell
angusfretwell / _colors.scss
Created June 15, 2014 14:06
Small utility for building colour classes.
// Define default background and foreground (text) colors:
$background-color: #fff;
$foreground-color: #222;
// Define our brand colors; text-color accepts a color, 'inverse', 'default', or false.
// e.g.:
// (
// prefix,
// brand-color,
@tcarlsen
tcarlsen / gulpfile.js
Last active July 11, 2016 20:20
My personally gulp file
/*jslint indent:2, node:true, sloppy:true*/
var
gulp = require('gulp'),
coffee = require('gulp-coffee'),
rename = require("gulp-rename"),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
styl = require('gulp-styl'),
concat = require('gulp-concat'),
csso = require('gulp-csso'),