Skip to content

Instantly share code, notes, and snippets.

View wayanjimmy's full-sized avatar
🏠
Working from home

Wayan jimmy wayanjimmy

🏠
Working from home
View GitHub Profile
@r17x
r17x / fetch-overwrite.md
Last active June 29, 2018 00:21
Overwrite & Replace Original Window.fetch for something logic & get information in every request & response

This code for get all information on event in request/response (XHR/Fetch) you can manipulation everything in Request/Response like headers, data, & etc.

i don't want to handle 10++ request for get something in request/response, so overwrite window.fetch (globally) to do it.

const OriginalFetch = window.fetch

window.fetch = (url, options) => {
@pyk
pyk / app.js
Last active July 31, 2018 16:06
app.js
// Models is sequelize instance
app.use('/smartphones', smartphonesRouter(models));
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@markwk
markwk / writings-tracking-with-git.bash
Last active January 7, 2025 15:35
My Writings Tracker with Git: A bash script for tracking my writings in plain tex files, calculate stats like word count, hashtags and new files, store stats to csv and commit to git.
#!/bin/bash
##################################
#
# THE ARCHIVE TRACKER
#
# REF: https://gist.github.com/markwk/c85a8a72bc8c03d0f510262bb5219a34/
#
# INTRODUCTION:
# Daily script to navigate to a directory of plain text files,
# add files to git repo, calculate key stats, store stats to csv
@busypeoples
busypeoples / TypeScriptFundamentals.ts
Last active June 21, 2022 14:57
TypeScript Fundamentals For JavaScript Developers
// TypeScript Fundamentals For JavaScript Developers
/*
Tutorial for JavaScript Developers wanting to get started with TypeScript.
Thorough walkthrough of all the basic features.
We will go through the basic features to gain a better understanding of the fundamentals.
You can uncomment the features one by one and work through this tutorial.
If you have any questions or feedback please connect via Twitter:
A. Sharif : https://twitter.com/sharifsbeat
*/
import React from "react"
import { render, Static, Box, Color, Text } from "ink"
import BigText from "ink-big-text"
import BBox from "ink-box"
import TextInput from "ink-text-input"
import { Tabs, Tab } from "ink-tab"
import _ from "lodash"
const purple = [102, 51, 153]
const hexPurple = `#663399`
@ryan-blunden
ryan-blunden / reset_sourcegraph_admin_password.md
Last active February 6, 2025 07:27
Instructions for resetting the Sourcegraph admin password

Presuming you have access to the Sourcegraph Docker container and the container name is sourcegraph:

  1. Get the id for the admin account (should be 1 in most cases):
docker container exec sourcegraph psql -U postgres sourcegraph -c 'SELECT id, username, passwd FROM users'
  1. Set the $ID variable:

1C Enterprise

     ∧ ∧
    (*‘ω‘ *)  
    (   )
      v v   
       川

ABAP

@markbil
markbil / compile-install-emacs.sh
Created January 14, 2021 11:40 — forked from ivan-loh/compile-install-emacs.sh
Compile and install emacs 27.1 for Ubuntu
#!/bin/bash
sudo apt install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev libgnutls28-dev
wget http://ftp.gnu.org/gnu/emacs/emacs-27.1.tar.gz
tar xvzf emacs-27.1.tar.gz
cd emacs-27.1
./configure
make