Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php/Beginners%27_Guide
- set font
#!/bin/bash | |
# Copyright © 2021 Chirag Bhatia | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php/Beginners%27_Guide
// var parser = document.createElement('a'); | |
// parser.href = "http://user:secretpassword@example.com:3000/pathname/?search=test#hash"; | |
// OR | |
var parser = new URL("http://user:secretpassword@example.com:3000/pathname/?search=test#hash"); | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" |
if (Object.defineProperty && Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(Element.prototype, "textContent") && !Object.getOwnPropertyDescriptor(Element.prototype, "textContent").get) { | |
(function() { | |
var innerText = Object.getOwnPropertyDescriptor(Element.prototype, "innerText"); | |
Object.defineProperty(Element.prototype, "textContent", | |
{ | |
get: function() { | |
return innerText.get.call(this); | |
}, | |
set: function(s) { | |
return innerText.set.call(this, s); |
# How to use: | |
# | |
# Dependencies - scort, imagemagick, i3lock | |
# | |
# Just place a lock.png in your home folder to overlay whatever you want | |
#!/bin/bash | |
scrot -e 'convert -blur 0x3 $f ~/lockbg.png' | |
convert -gravity center -composite ~/lockbg.png ~/lock.png ~/lockfinal.png | |
i3lock -i ~/lockfinal.png -p default -e |
# Watch a file changes in the current directory, | |
# Execute all tests when a file is changed or renamed | |
$watcher = New-Object System.IO.FileSystemWatcher | |
$watcher.Path = Get-Location | |
$watcher.IncludeSubdirectories = $true | |
$watcher.EnableRaisingEvents = $false | |
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName | |
while($true) |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
Below is our current practice for using Git (the technology) & Github (the repository) when collaborating on projects. This process assumes that you already have Git installed & configured, and there is an existing project repository on Github with a "development" branch already setup.
If you do not have Git installed, follow these instructions.
This process also assumes that you are using the command line, however most of these tasks can be performed with a desktop client like Github for Mac or Tower.
1.) Open terminal and locate the project directory you wish to use.
/* | |
* @description: A code snippet that mimics the popular Select * SQL syntax in force.com's Apex language. | |
*/ | |
// Initialize setup variables | |
String objectName = 'Contact'; // modify as needed | |
String query = 'SELECT'; | |
Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap(); | |
// Grab the fields from the describe method and append them to the queryString one by one. |
import numpy as np | |
import pandas as pd | |
#### creating dataframes, adding and dropping columns | |
df = pd.DataFrame(np.arange(1,10).reshape(3,3),['A','B','C'],['w','x','y']) | |
df.columns = ['W','X','Y'] # change column names | |
df['Z']=df['X']+df['Y'] # new column with values X+Y | |
df['XX']=df.apply(lambda row: row['X']*2, axis=1) # new column with values twice of column X | |
df['YY']=1 # new column of ones |