Skip to content

Instantly share code, notes, and snippets.

View xlogix's full-sized avatar
👨‍💻
contributing to open-source

Abhishek Uniyal xlogix

👨‍💻
contributing to open-source
View GitHub Profile
@xlogix
xlogix / ID3.java
Created January 15, 2018 06:27
Sorting of Tags in MP3 files
import java.io.RandomAccessFile;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.File;
public class ID3 {
File mp3File;
private final String encoding = "Cp437";
@xlogix
xlogix / schema.graphql
Created July 8, 2019 08:28 — forked from krsnvijay/schema.graphql
RLE Suite Graphql Schema
type User @model {
id: ID!
username: String!
firstName: String!
lastName: String!
profilePic: String!
email: String!
bio: String
about: String
tags: [String!]
val forName = Class::class.java.getDeclaredMethod("forName", String::class.java)
val getDeclaredMethod = Class::class.java.getDeclaredMethod("getDeclaredMethod", String::class.java, arrayOf<Class<*>>()::class.java)
val vmRuntimeClass = forName.invoke(null, "dalvik.system.VMRuntime") as Class<*>
val getRuntime = getDeclaredMethod.invoke(vmRuntimeClass, "getRuntime", null) as Method
val setHiddenApiExemptions = getDeclaredMethod.invoke(vmRuntimeClass, "setHiddenApiExemptions", arrayOf(arrayOf()::class.java)) as Method
val vmRuntime = getRuntime.invoke(null)
setHiddenApiExemptions.invoke(vmRuntime, arrayOf("L"))
@xlogix
xlogix / crontab
Created January 27, 2020 12:44
Cron Jobs Examples
# Suppress attempts to mail output. We'll check syslog.
MAILTO=""
PYTHON=/root/bot/env/bin/python
# Kick off Payday every Thursday.
0 5 * * 4 $PYTHON /root/bot/payday.py 2>&1 | logger -t KICK-OFF-PAYDAY
# Poll for updates every minute.
* * * * * /root/bot/update.sh 2>&1 | logger -t UPDATE-BOT
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/npm-* && rm -rf $TMPDIR/haste-* && rm -rf $TMPDIR/metro-* && rm -rf node_modules && npm install && rm -rf ios/Pods && cd ios && pod cache clean --all && pod repo update && pod install && ./android/gradlew clean -p ./android/ && rm -rf ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData && npm start -- --reset-cache
@xlogix
xlogix / GmailController.js
Created March 26, 2020 11:22 — forked from tojibon/GmailController.js
OAuth2 google authentication and saving information on MongoDB database and later use the token / refreshtoken to retrieve profile information.
/**
* Admin/GmailController
*
* @description :: Server-side logic for managing admin/gmails
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
Help Links:
https://github.com/mscdex/node-imap
https://github.com/pipedrive/inbox
https://github.com/google/google-api-nodejs-client
@xlogix
xlogix / keybase.md
Created March 29, 2020 19:46
Keybase ID

Keybase proof

I hereby claim:

  • I am xlogix on github.
  • I am abhishekuniyal (https://keybase.io/abhishekuniyal) on keybase.
  • I have a public key whose fingerprint is C000 D68F 8500 E966 9C14 E0F6 603F 5557 2B04 A21A

To claim this, I am signing this object:

@xlogix
xlogix / filenames-without-ext.sh
Created March 29, 2020 21:05
Extract filenames without their extensions and put it in the clipboard
ls -C | awk -F"." '{print $1}' | xclip -selection c