Skip to content

Instantly share code, notes, and snippets.

View crossdjinn's full-sized avatar

CrossDJinn crossdjinn

View GitHub Profile
angular.module('app',[])
.config(function($mdThemingProvider) {
// 4 real time change
$mdThemingProvider.alwaysWatchTheme(true);
// 4 custom md-toast theme
$mdThemingProvider.theme("success-toast");
$mdThemingProvider.theme("error-toast");
// here we go 4 CustomPalette
@crossdjinn
crossdjinn / angular-rest-api.js
Created August 4, 2018 02:57
Angular (1.6.8) example of "TRACKS" API
angular.module('app',[])
.factory('TRACKS', ['$resource',
function($resource) {
return $resource('/api/tracks/:id', {id: '@_id'}, {
'query': {method:'GET', isArray:true},
'get': {method:'GET'},
'update': {method:'PUT'},
'save': {method:'POST'},
'remove': {method:'DELETE'},
'delete': {method:'DELETE'}
@crossdjinn
crossdjinn / index.html
Created August 30, 2018 14:03 — forked from wesbos/index.html
ios 11 compatible getUserMedia
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
@crossdjinn
crossdjinn / mkv meta rename
Last active November 24, 2018 05:12
bash, mkvtoolnix => set the title of all mkv files in a directory, by the filename
#!/bin/bash
# This script takes all mkv files in the current directory and sets the filename
# (without .mkv) as its title in metadata
# https://apple.stackexchange.com/a/273021
for mkvfile in *.mkv; do
mkvpropedit "$mkvfile" -e info -s title="${mkvfile::-4}"
done
@crossdjinn
crossdjinn / linux, bash, mouse, sensitive
Last active November 24, 2018 06:29
how to set up the finnest level of Apple Magic Mouse <3 on Linux
// https://askubuntu.com/questions/205676/how-to-change-mouse-speed-sensitivity/208230#208230
// list of devices and their ID = xx
xinput --list --short
// list of properities look for "yyy"
// Device Accel Constant Deceleration (269): 1.000000
xinput --list-props "xx"
// set finnest "z.z" level ever
// WARN !!! reset after restarty, setup as startup script, viz down
@crossdjinn
crossdjinn / install gnome 3
Created November 24, 2018 22:09
gmone 3 linux ubuntu studio 16.04
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install ubuntu-gnome-desktop
sudo apt-get install input-utils mtdev-tools
// list of omg all
sudo lsinput
// test out
sudo mtdev-test /dev/input/event"xx"
// <3
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'
// https://lame.buanzo.org/ffmpeg-mac-2.2.2.zip
/Library/Application Support/audacity/libs/libavformat.55.dylib
@crossdjinn
crossdjinn / mac os x finder -> terminal
Created December 3, 2018 12:51
open terminal here in best way ever
// https://github.com/jbtule/cdto#cd-to
drag and drop CMD and ALT file or folder into launcher to open terminal HERE xD awesome <3