Skip to content

Instantly share code, notes, and snippets.

View aliusman's full-sized avatar
🎯
Focusing

ALI USMAN aliusman

🎯
Focusing
View GitHub Profile
//Commit any changes to the record
current.update();
//Check to make sure the table isn't synchronized already
var tbl = current.getTableName();
/*
if(tbl.startsWith('wf_') || tbl.startsWith('sys_ui_') || tbl == 'sys_choice' || current.getED().getBooleanAttribute('update_synch') || current.getED().getBooleanAttribute('update_synch_custom')){
gs.addErrorMessage('Updates are already being recorded for this table.');
action.setRedirectURL(current);
}
@aliusman
aliusman / README.md
Created March 27, 2021 16:42 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@aliusman
aliusman / Touchbar System Stats.json
Created December 25, 2020 11:25 — forked from dploeger/Touchbar System Stats.json
System Stats (CPU load, Free Memory, Free disk space) for Apple Touchbar using Bettertouchtool
{
"BTTPresetName" : "Touchbar System Stats",
"BTTPresetUUID" : "5BCAEC41-D306-4BB6-B172-F9EBB974D4D3",
"BTTPresetContent" : [
{
"BTTAppBundleIdentifier" : "BT.G",
"BTTAppName" : "Global",
"BTTAppSpecificSettings" : {
},
@aliusman
aliusman / RecyclerViewActivity.cs
Created February 14, 2020 14:59 — forked from martijn00/RecyclerViewActivity.cs
Load more / endless scroll for Xamarin RecyclerView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = base.OnCreateView(inflater, container, savedInstanceState);
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.my_recycler_view);
if (recyclerView != null)
{
recyclerView.HasFixedSize = true;
var layoutManager = new LinearLayoutManager(Activity);
@aliusman
aliusman / index.js
Created August 22, 2019 16:40 — forked from stephanbogner/index.js
Create tree structure from paths array
var paths = [
["Account"],
["Account", "Payment Methods"],
["Account", "Payment Methods", "Credit Card"],
["Account", "Payment Methods", "Paypal"],
["Account", "Emails"],
["Account", "Emails", "Main Email"],
["Account", "Emails", "Backup Email"],
["Account", "Devices"],
["Account", "Devices", "Google Pixel"],
@aliusman
aliusman / SubdomainRoute.cs
Created April 23, 2019 06:25 — forked from bjcull/SubdomainRoute.cs
A class to detect the subdomain and pass it through as a route parameter
public class SubdomainRoute : RouteBase
{
public override RouteData GetRouteData(HttpContextBase httpContext)
{
if (httpContext.Request == null || httpContext.Request.Url == null)
{
return null;
}
var host = httpContext.Request.Url.Host;
@aliusman
aliusman / browser_detect.js
Created December 12, 2018 05:23 — forked from 2107/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;