Skip to content

Instantly share code, notes, and snippets.

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

Osman Sekerlen pegasuspect

🏠
Working from home
View GitHub Profile
@pegasuspect
pegasuspect / keybindings.json
Created March 12, 2021 14:39
Personal VS Code Keyboard Shortcuts
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+k cmd+l",
"command": "editor.action.transformToLowercase"
},
{
"key": "cmd+k cmd+u",
"command": "editor.action.transformToUppercase"
},
@pegasuspect
pegasuspect / .favorite_commands.sh
Last active March 12, 2021 14:37
Most useful commands in terminal on macbook for me. In order:
npm run-script
npm -g list -depth=0
du -sh ~/Downloads/*
zip -r -X archive_name.zip folder_to_compress # -X is for ignoring mac files.
unzip archive_name.zip
declare -F # list declared function names, small -f will show insides
cal
@pegasuspect
pegasuspect / gist:c1c864c540263ae2319773d6a9306545
Last active February 19, 2021 19:44 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
// This is the JavaScript file for the basic LabVIEW WebSockets demo.
// Copyright © 2016 by MediaMongrels Ltd.
class Connect {
constructor(port, ind) {
this.ind = ind.toString();
this.num = port;
this.sendString = '#port' + this.ind + 'send';
this.chatString = '#port' + this.ind + 'chat';
this.host = "ws://localhost:" + this.num;
@pegasuspect
pegasuspect / .bash_profile
Created July 22, 2018 04:33
My Bash Profile file, for Mac Terminal
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
print_greeting()
{
if [[ -f ~/.shell.greeting ]]; then
# Credits to:
@pegasuspect
pegasuspect / Debugging event bubbling
Last active August 10, 2018 20:54
Paste it to developer console and click on any element.
var eventsToBeDebuggedSeperatedBySpaces = 'focus';
$('*').each(function(){
var eventHandler = function(event) {
var el = $(event.currentTarget).clone();
var str = $("<div>").append(el).html();
str = str.substring(0, str.indexOf(el.html()))
console.log(str.trim().length == 0 ? this.tagName : str.substr(0, 120));
}.bind(this);
this.addEventListener(eventsToBeDebuggedSeperatedBySpaces, eventHandler, true);
this.addEventListener(eventsToBeDebuggedSeperatedBySpaces, eventHandler, false);